Method VectorSearch
VectorSearch<TInput, TField>(Expression<Func<TInput, TField>>, QueryVector, int, VectorSearchOptions<TInput>)
Creates a $vectorSearch stage.
public static PipelineStageDefinition<TInput, TInput> VectorSearch<TInput, TField>(Expression<Func<TInput, TField>> field, QueryVector queryVector, int limit, VectorSearchOptions<TInput> options)
Parameters
field
Expression<Func<TInput, TField>>The field.
queryVector
QueryVectorThe query vector.
limit
intThe limit.
options
VectorSearchOptions<TInput>The options.
Returns
- PipelineStageDefinition<TInput, TInput>
The stage.
Type Parameters
TInput
The type of the input documents.
TField
The type of the field.
VectorSearch<TInput>(FieldDefinition<TInput>, QueryVector, int, VectorSearchOptions<TInput>)
Creates a $vectorSearch stage.
public static PipelineStageDefinition<TInput, TInput> VectorSearch<TInput>(FieldDefinition<TInput> field, QueryVector queryVector, int limit, VectorSearchOptions<TInput> options = null)
Parameters
field
FieldDefinition<TInput>The field.
queryVector
QueryVectorThe query vector.
limit
intThe limit.
options
VectorSearchOptions<TInput>The options.
Returns
- PipelineStageDefinition<TInput, TInput>
The stage.
Type Parameters
TInput
The type of the input documents.