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
pipelinePipelineDefinition<TInput, TOutput>The pipeline.
fieldExpression<Func<TOutput, TField>>The field.
queryVectorQueryVectorThe query vector.
limitintThe limit.
optionsVectorSearchOptions<TOutput>The vector search options.
Returns
- PipelineDefinition<TInput, TOutput>
A new pipeline with an additional stage.
Type Parameters
TInputThe type of the input.
TFieldThe type of the field.
TOutputThe 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
pipelinePipelineDefinition<TInput, TOutput>The pipeline.
fieldFieldDefinition<TOutput>The field.
queryVectorQueryVectorThe query vector.
limitintThe limit.
optionsVectorSearchOptions<TOutput>The vector search options.
Returns
- PipelineDefinition<TInput, TOutput>
A new pipeline with an additional stage.
Type Parameters
TInputThe type of the input.
TOutputThe type of the output.