Click or drag to resize

PipelineStageDefinitionBuilderVectorSearchTInput Method (FieldDefinitionTInput, 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>(
	FieldDefinition<TInput> field,
	QueryVector queryVector,
	int limit,
	VectorSearchOptions<TInput> options = null
)

Parameters

field
Type: MongoDB.DriverFieldDefinitionTInput
The field.
queryVector
Type: MongoDB.DriverQueryVector
The query vector.
limit
Type: SystemInt32
The limit.
options (Optional)
Type: MongoDB.DriverVectorSearchOptionsTInput
The options.

Type Parameters

TInput
The type of the input documents.

Return Value

Type: PipelineStageDefinitionTInput, TInput
The stage.
See Also