Table of Contents

Method HybridSearchAsync

Namespace
Qavren.Edge.VectorData
Assembly
Qavren.Edge.VectorData.dll

HybridSearchAsync<TInput>(TInput, ICollection<string>, int, HybridSearchOptions<TRecord>?, CancellationToken)

vec0 KNN fused with FTS5 bm25 by reciprocal rank fusion.

Score here is the RRF score: higher is better - the opposite of SearchAsync<TInput>(TInput, int, VectorSearchOptions<TRecord>?, CancellationToken)'s distance. Consistently, HybridSearchOptions.ScoreThreshold is applied to the fused score as a client-side >= after the query, where vector search pushes its threshold down as distance <=.

Pass EdgeHybridSearchOptions<TRecord> to tune rrf_k (default 60), the lane weights (default 1.0 each) and the per-lane candidate count (default (top + Skip) * 4, capped at 4096). An empty or all-whitespace keyword collection short-circuits the FTS lane and degenerates to plain KNN rather than emitting a malformed MATCH.

public IAsyncEnumerable<VectorSearchResult<TRecord>> HybridSearchAsync<TInput>(TInput searchValue, ICollection<string> keywords, int top, HybridSearchOptions<TRecord>? options = null, CancellationToken cancellationToken = default) where TInput : notnull

Parameters

searchValue TInput

The query vector, or the text to embed into one.

keywords ICollection<string>

The keywords. Each is quoted, so FTS5 operators inside one are inert.

top int

How many results to return.

options HybridSearchOptions<TRecord>

Filter, threshold, skip, column filter and vector-inclusion options.

cancellationToken CancellationToken

Cancels the work.

Returns

IAsyncEnumerable<VectorSearchResult<TRecord>>

The results, best first.

Type Parameters

TInput

The search input type.