Method VectorSearch
| MongoDB CSharp Driver API Reference (original) (raw)
Namespace
Assembly
MongoDB.Driver.dll
VectorSearch<TInput, TField, TOutput>(PipelineDefinition<TInput, TOutput>, Expression<Func<TOutput, TField>>, QueryVector, int, VectorSearchOptions)
Appends a $vectorSearch stage to the pipeline.
public static PipelineDefinition<TInput, TOutput> VectorSearch<TInput, TField, TOutput>(this PipelineDefinition<TInput, TOutput> pipeline, Expression<Func<TOutput, TField>> field, QueryVector queryVector, int limit, VectorSearchOptions<TOutput> options = null)Parameters
pipeline PipelineDefinition<TInput, TOutput>
The pipeline.
field Expression<Func<TOutput, TField>>
The field.
queryVector QueryVector
The query vector.
limit int
The limit.
options VectorSearchOptions
The vector search options.
Returns
PipelineDefinition<TInput, TOutput>
A new pipeline with an additional stage.
Type Parameters
TInput
The type of the input.
TField
The type of the field.
TOutput
The type of the output.
VectorSearch<TInput, TOutput>(PipelineDefinition<TInput, TOutput>, FieldDefinition, QueryVector, int, VectorSearchOptions)
Appends a $vectorSearch stage to the pipeline.
public static PipelineDefinition<TInput, TOutput> VectorSearch<TInput, TOutput>(this PipelineDefinition<TInput, TOutput> pipeline, FieldDefinition<TOutput> field, QueryVector queryVector, int limit, VectorSearchOptions<TOutput> options = null)Parameters
pipeline PipelineDefinition<TInput, TOutput>
The pipeline.
field FieldDefinition
The field.
queryVector QueryVector
The query vector.
limit int
The limit.
options VectorSearchOptions
The vector search options.
Returns
PipelineDefinition<TInput, TOutput>
A new pipeline with an additional stage.
Type Parameters
TInput
The type of the input.
TOutput
The type of the output.