Package com.mongodb.client.model.search
Interface TextVectorSearchQuery
- All Superinterfaces:
org.bson.conversions.Bson,VectorSearchQuery
A text-based vector search query for MongoDB Atlas auto-embedding.
This interface extends VectorSearchQuery and provides methods for configuring
text-based queries that will be automatically embedded by the server.
- Since:
- 5.7.0
- See Also:
- MongoDB Atlas documentation
- $vectorSearch
-
Field Summary
Fields inherited from interface org.bson.conversions.Bson
DEFAULT_CODEC_REGISTRY -
Method Summary
Modifier and TypeMethodDescriptionSpecifies the embedding model to use for generating embeddings from the query text.Methods inherited from interface org.bson.conversions.Bson
toBsonDocument, toBsonDocument
-
Method Details
-
model
Specifies the embedding model to use for generating embeddings from the query text.If not specified, the model configured in the vector search index definition will be used. The specified model must be compatible with the model used in the index definition.
- Parameters:
modelName- The name of the embedding model to use (e.g., "voyage-4-large").- Returns:
- A new
TextVectorSearchQuerywith the specified model.
-