共用方式為


SearchIndexClient.GetIndexStatistics(String, CancellationToken) Method

Definition

Gets SearchIndexStatistics for the given index, including a document count and storage usage.

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

Parameters

indexName
String

Required. The name of the index.

cancellationToken
CancellationToken

Optional CancellationToken to propagate notifications that the operation should be canceled.

Returns

The Response<T> from the server containing SearchIndexStatistics names.

Exceptions

Thrown when indexName is null.

Thrown when a failure is returned by the Search service.

Applies to