Table of Contents

Method WaitForSearchIndexes

Namespace
MongoDB.EntityFrameworkCore
Assembly
MongoDB.EntityFrameworkCore.dll

WaitForSearchIndexes(DatabaseFacade, TimeSpan?)

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

public static void WaitForSearchIndexes(this DatabaseFacade databaseFacade, TimeSpan? timeout = null)

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.

Exceptions

InvalidOperationException

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