Method CreateMissingSearchIndexesAsync
- Namespace
- MongoDB.EntityFrameworkCore
- Assembly
- MongoDB.EntityFrameworkCore.dll
CreateMissingSearchIndexesAsync(DatabaseFacade, CancellationToken)
Creates missing MongoDB search indexes in the MongoDB database for all SearchIndexDefinition definitions in the EF Core model for which there is not already an index in the database.
public static Task CreateMissingSearchIndexesAsync(this DatabaseFacade databaseFacade, CancellationToken cancellationToken = default)
Parameters
databaseFacadeDatabaseFacadeThe DatabaseFacade from the EF Core DbContext.
cancellationTokenCancellationTokenA CancellationToken that can be used to cancel this asynchronous request.