SearchIndexClient.GetIndexStatisticsAsync Method

Definition

Overloads

Name Description
GetIndexStatisticsAsync(String, CancellationToken)

Returns statistics for the given index, including a document count and storage usage.

GetIndexStatisticsAsync(String, RequestContext)

[Protocol Method] Returns statistics for the given index, including a document count and storage usage.

  • This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.

GetIndexStatisticsAsync(String, CancellationToken)

Source:
SearchIndexClient.cs
Source:
SearchIndexClient.cs

Returns statistics for the given index, including a document count and storage usage.

public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Search.Documents.Indexes.Models.SearchIndexStatistics>> GetIndexStatisticsAsync(string indexName, System.Threading.CancellationToken cancellationToken = default);
abstract member GetIndexStatisticsAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Search.Documents.Indexes.Models.SearchIndexStatistics>>
override this.GetIndexStatisticsAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Search.Documents.Indexes.Models.SearchIndexStatistics>>
Public Overridable Function GetIndexStatisticsAsync (indexName As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of SearchIndexStatistics))

Parameters

indexName
String

The name of the index.

cancellationToken
CancellationToken

The cancellation token that can be used to cancel the operation.

Returns

The Response<T> from the server containing SearchIndexStatistics.

Exceptions

indexName is null.

indexName is an empty string, and was expected to be non-empty.

Service returned a non-success status code.

Applies to

GetIndexStatisticsAsync(String, RequestContext)

Source:
SearchIndexClient.cs

[Protocol Method] Returns statistics for the given index, including a document count and storage usage.

  • This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
public virtual System.Threading.Tasks.Task<Azure.Response> GetIndexStatisticsAsync(string indexName, Azure.RequestContext context);
abstract member GetIndexStatisticsAsync : string * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
override this.GetIndexStatisticsAsync : string * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
Public Overridable Function GetIndexStatisticsAsync (indexName As String, context As RequestContext) As Task(Of Response)

Parameters

indexName
String

The name of the index.

context
RequestContext

The request options, which can override default behaviors of the client pipeline on a per-call basis.

Returns

The response returned from the service.

Exceptions

indexName is null.

indexName is an empty string, and was expected to be non-empty.

Service returned a non-success status code.

Applies to