Constructor VectorQueryOptions
- Namespace
- MongoDB.EntityFrameworkCore.Metadata
- Assembly
- MongoDB.EntityFrameworkCore.dll
VectorQueryOptions(string?, int?, bool)
Query options for running an Atlas Vector Search with VectorSearch<TSource, TProperty>(IQueryable<TSource>, Expression<Func<TSource, TProperty>>, Expression<Func<TSource, bool>>, QueryVector, int, VectorQueryOptions?).
public VectorQueryOptions(string? IndexName = null, int? NumberOfCandidates = null, bool Exact = false)
Parameters
IndexNamestringThe name of the vector search index to use.
NumberOfCandidatesint?Number of nearest neighbors to use during the search. Value must be less than or equal to 10000, and greater than or equal to the document limit. We recommend that you specify a number at least 20 times higher than the number of documents to return (limit) to increase accuracy.
ExactboolIf true, then an exact ENN search is used, otherwise an approximate ANN search is used. ENN must be used if the number of candidates is omitted.