Method VectorSearch
VectorSearch<TInput, TField, TOutput>(PipelineDefinition<TInput, TOutput>, Expression<Func<TOutput, TField>>, QueryVector, int, VectorSearchOptions<TOutput>)
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
intThe limit.
options
VectorSearch <TOutput>Options The vector search options.
Returns
- Pipeline
Definition <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<TOutput>, QueryVector, int, VectorSearchOptions<TOutput>)
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 <TOutput>The field.
queryVector
QueryVector The query vector.
limit
intThe limit.
options
VectorSearch <TOutput>Options The vector search options.
Returns
- Pipeline
Definition <TInput, TOutput> A new pipeline with an additional stage.
Type Parameters
TInput
The type of the input.
TOutput
The type of the output.