Table of Contents

Method VectorSearch

Namespace
MongoDB.Driver
Assembly
MongoDB.Driver.dll

VectorSearch<TResult>(IAggregateFluent<TResult>, Expression<Func<TResult, object>>, QueryVector, int, VectorSearchOptions<TResult>)

Appends a $vectorSearch stage.

public static IAggregateFluent<TResult> VectorSearch<TResult>(this IAggregateFluent<TResult> aggregate, Expression<Func<TResult, object>> field, QueryVector queryVector, int limit, VectorSearchOptions<TResult> options = null)

Parameters

aggregate IAggregateFluent<TResult>

The aggregate.

field Expression<Func<TResult, object>>

The field.

queryVector QueryVector

The query vector.

limit int

The limit.

options VectorSearchOptions<TResult>

The vector search options.

Returns

IAggregateFluent<TResult>

The fluent aggregate interface.

Type Parameters

TResult

The type of the result.