Table of Contents

Constructor CreateAutoEmbeddingVectorSearchIndexModel

Namespace
MongoDB.Driver
Assembly
MongoDB.Driver.dll

CreateAutoEmbeddingVectorSearchIndexModel(FieldDefinition<TDocument>, string, string, params FieldDefinition<TDocument>[])

Initializes a new instance of the CreateAutoEmbeddingVectorSearchIndexModel<TDocument> for a vector index that will automatically create embeddings from a given field in the document. The embedding model to use must be passed to this constructor.

public CreateAutoEmbeddingVectorSearchIndexModel(FieldDefinition<TDocument> field, string name, string embeddingModelName, params FieldDefinition<TDocument>[] filterFields)

Parameters

field FieldDefinition<TDocument>

The field containing the vectors to index.

name string

The index name.

embeddingModelName string

The name of the embedding model to use, such as "voyage-4", "voyage-4-large", etc.

filterFields FieldDefinition<TDocument>[]

Fields that may be used as filters in the vector query.

CreateAutoEmbeddingVectorSearchIndexModel(Expression<Func<TDocument, object>>, string, string, params Expression<Func<TDocument, object>>[])

Initializes a new instance of the CreateAutoEmbeddingVectorSearchIndexModel<TDocument> for a vector index that will automatically create embeddings from a given field in the document. The embedding model to use must be passed to this constructor.

public CreateAutoEmbeddingVectorSearchIndexModel(Expression<Func<TDocument, object>> field, string name, string embeddingModelName, params Expression<Func<TDocument, object>>[] filterFields)

Parameters

field Expression<Func<TDocument, object>>

An expression pointing to the field containing the vectors to index.

name string

The index name.

embeddingModelName string

The name of the embedding model to use, such as "voyage-4", "voyage-4-large", etc.

filterFields Expression<Func<TDocument, object>>[]

Expressions pointing to fields that may be used as filters in the vector query.