Click or drag to resize

PipelineStageDefinitionBuilderVectorSearchTInput, TField Method (ExpressionFuncTInput, TField, QueryVector, Int32, VectorSearchOptionsTInput)

Creates a $vectorSearch stage.

Namespace:  MongoDB.Driver
Assembly:  MongoDB.Driver (in MongoDB.Driver.dll) Version: 2.22.0+75246110ed1247226fcc7f8eb2c54ffab745693e
Syntax
public static PipelineStageDefinition<TInput, TInput> VectorSearch<TInput, TField>(
	Expression<Func<TInput, TField>> field,
	QueryVector queryVector,
	int limit,
	VectorSearchOptions<TInput> options
)

Parameters

field
Type: System.Linq.ExpressionsExpressionFuncTInput, TField
The field.
queryVector
Type: MongoDB.DriverQueryVector
The query vector.
limit
Type: SystemInt32
The limit.
options
Type: MongoDB.DriverVectorSearchOptionsTInput
The options.

Type Parameters

TInput
The type of the input documents.
TField
The type of the field.

Return Value

Type: PipelineStageDefinitionTInput, TInput
The stage.
See Also