Method WaitForVectorIndexesAsync
- Namespace
- MongoDB.EntityFrameworkCore
- Assembly
- MongoDB.EntityFrameworkCore.dll
WaitForVectorIndexesAsync(DatabaseFacade, TimeSpan?, CancellationToken)
Blocks until all vector indexes in the mapped collections are reporting the 'READY' state.
public static Task WaitForVectorIndexesAsync(this DatabaseFacade databaseFacade, TimeSpan? timeout = null, CancellationToken cancellationToken = default)
Parameters
databaseFacadeDatabaseFacadeThe DatabaseFacade from the EF Core DbContext.
timeoutTimeSpan?The minimum amount of time to wait for all indexes to be 'READY' before aborting. The default is 60 seconds. Zero seconds means no timeout.
cancellationTokenCancellationTokenA CancellationToken that can be used to cancel this asynchronous request.
Returns
Exceptions
- InvalidOperationException
if the timeout expires before all indexes are 'READY'.