SearchClient.GetDocumentCount(CancellationToken) Method

Definition

Queries the number of documents in the index.

public virtual Azure.Response<long> GetDocumentCount(System.Threading.CancellationToken cancellationToken = default);
abstract member GetDocumentCount : System.Threading.CancellationToken -> Azure.Response<int64>
override this.GetDocumentCount : System.Threading.CancellationToken -> Azure.Response<int64>
Public Overridable Function GetDocumentCount (Optional cancellationToken As CancellationToken = Nothing) As Response(Of Long)

Parameters

cancellationToken
CancellationToken

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

Returns

The number of documents in the search index.

Exceptions

Service returned a non-success status code.

Applies to