milvus-logo
LFAI
< Docs
  • C#

GetEntityCountAsync()

Retrieves the current number of entities in the collection. Call FlushAsync before invoking this method to ensure up-to-date results.

Invocation

await collection.GetEntityCountAsync(cancellationToken = default);

Parameters

ParameterDescriptionTypeRequired
cancellationTokenThe token to monitor for cancellation requests. The default value is CancellationToken.None.CancellationTokenFalse

Return

The number of entities currently in the collection.