Table of Contents

Method WaitForSearchIndexesAsync

Namespace
MongoDB.EntityFrameworkCore
Assembly
MongoDB.EntityFrameworkCore.dll

WaitForSearchIndexesAsync(DatabaseFacade, TimeSpan?, CancellationToken)

Blocks until all search indexes in the mapped collections are reporting the 'READY' state.

public static Task WaitForSearchIndexesAsync(this DatabaseFacade databaseFacade, TimeSpan? timeout = null, CancellationToken cancellationToken = default)

Parameters

databaseFacade DatabaseFacade

The DatabaseFacade from the EF Core DbContext.

timeout TimeSpan?

The minimum amount of time to wait for all indexes to be 'READY' before aborting. If null, defaults to 60 seconds. Zero seconds means no timeout.

cancellationToken CancellationToken

A CancellationToken that can be used to cancel this asynchronous request.

Returns

Task

A Task to track this async operation.

Exceptions

InvalidOperationException

if the timeout expires before all indexes are 'READY'.