Table of Contents

Constructor CreateSearchIndexModel

Namespace
MongoDB.Driver
Assembly
MongoDB.Driver.dll

CreateSearchIndexModel(string, BsonDocument)

Initializes a new instance of the CreateSearchIndexModel class, passing the index model as a BsonDocument.

public CreateSearchIndexModel(string name, BsonDocument definition)

Parameters

name string

The index name.

definition BsonDocument

The index definition.

Remarks

Consider using CreateVectorSearchIndexModel<TDocument> to build vector indexes without specifying the BSON directly.

CreateSearchIndexModel(string, SearchIndexType?, BsonDocument)

Initializes a new instance of the CreateSearchIndexModel class, passing the index model as a BsonDocument.

public CreateSearchIndexModel(string name, SearchIndexType? type, BsonDocument definition)

Parameters

name string

The index name.

type SearchIndexType?

The index type.

definition BsonDocument

The index definition.

Remarks

Consider using CreateVectorSearchIndexModel<TDocument> to build vector indexes without specifying the BSON directly.

CreateSearchIndexModel(string, SearchIndexType?)

Initializes a new instance of the CreateSearchIndexModel class.

protected CreateSearchIndexModel(string name, SearchIndexType? type)

Parameters

name string

The index name.

type SearchIndexType?

The index type.