Table of Contents

Method CreateMissingVectorIndexesAsync

Namespace
MongoDB.EntityFrameworkCore
Assembly
MongoDB.EntityFrameworkCore.dll

CreateMissingVectorIndexesAsync(DatabaseFacade, CancellationToken)

Creates missing Atlas vector indexes in the MongoDB database for all IIndex definitions in the EF Core model for which there is not already an index in the database.

public static Task CreateMissingVectorIndexesAsync(this DatabaseFacade databaseFacade, CancellationToken cancellationToken = default)

Parameters

databaseFacade DatabaseFacade

The DatabaseFacade from the EF Core DbContext.

cancellationToken CancellationToken

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

Returns

Task

A Task to track this async operation.