Table of Contents

Class CreateVectorSearchIndexModelBase<TDocument>

Namespace
MongoDB.Driver
Assembly
MongoDB.Driver.dll

Defines common parts of a vector index model using strongly-typed C# APIs.

public abstract class CreateVectorSearchIndexModelBase<TDocument> : CreateSearchIndexModel

Type Parameters

TDocument
Inheritance
CreateVectorSearchIndexModelBase<TDocument>
Derived
Inherited Members

Constructors

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

Initializes a new instance of the CreateVectorSearchIndexModelBase<TDocument> class for a vector index where the vector embeddings are created manually. The required options for VectorSimilarity and the number of vector dimensions are passed to the constructor.

Properties

Dimensions

Number of vector dimensions that vector search enforces at index-time and query-time, or uses to build the embeddings for auto-embedding indexes.

ExcludedStoredFields

The fields that must NOT be stored in the index. Use WithExcludedStoredFields(params FieldDefinition<TDocument>[]) or WithExcludedStoredFields(params FieldDefinition<TDocument>[]) to configure this.

Field

The field containing the vectors to index.

FilterFields

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

HnswMaxEdges

Maximum number of edges (or connections) that a node can have in the Hierarchical Navigable Small Worlds graph.

HnswNumEdgeCandidates

Analogous to numCandidates at query-time, this parameter controls the maximum number of nodes to evaluate to find the closest neighbors to connect to a new node.

IncludedStoredFields

The fields that must be stored in the index. Use WithIncludedStoredFields(params FieldDefinition<TDocument>[]) or WithIncludedStoredFields(params FieldDefinition<TDocument>[]) to configure this.

Quantization

Type of automatic vector quantization for your vectors.