Configuration for MongoDB vector search index.
Two modes depending on whether embeddings is provided on the store:
Manual embedding — embeddings is set on MongoDBStoreParams.
The store computes vectors via embedDocuments() / embedQuery() and stores
float arrays in the embedding field. Requires dims and similarityFunction.
Auto embedding — no embeddings on MongoDBStoreParams.
MongoDB generates embeddings server-side via Voyage AI using the configured model.
The store does not write an embedding field — MongoDB reads the source text directly
from the field specified by path (e.g. "value.content"). Requires model and path.
Embedding dimensionality. Required for manual embedding so that the vector search index can be created with the correct number of dimensions. Not required for auto embedding, where the model determines dimensionality.
Sub-field of value to embed (e.g. "content"). If omitted, the entire value object is serialized and embedded.
Additional filter fields to declare in the vector search index.
Modality for auto embedding (default: "text").
Voyage AI model name for auto embedding (e.g. "voyage-4", "voyage-4-lite", "voyage-4-large", "voyage-code-3"). Required for auto embedding. MongoDB uses this model to generate embeddings server-side.
Vector search index name
Field path used in the $vectorSearch stage and vector search index definition.
Similarity function (default: "cosine"). Required for manual embedding.