Skip to main content

Module sparse

Module sparse 

Source
Expand description

Sparse vectors and Reciprocal Rank Fusion for hybrid search (ADR-0043).

A SparseVector is a learned-sparse (SPLADE/BGE-M3) or lexical term-weight vector — parallel indices (dimension ids) and values (weights). It rides in the point payload under SPARSE_KEY (no on-disk format change); the embeddable engine builds a derived inverted index from it. rrf_fuse merges the dense and sparse result lists by rank, the standard hybrid fuser.

Structs§

SparseVector
A sparse vector: parallel indices and values. Indices are dimension ids into a (possibly very large) sparse vocabulary; values are their weights.

Constants§

DEFAULT_RRF_K0
The conventional RRF rank-bias constant (Cormack et al., 2009).
SPARSE_KEY
The reserved payload key carrying a point’s sparse vector (ADR-0043).

Functions§

rrf_fuse
Fuse several ranked id lists by Reciprocal Rank Fusion and return the top top_k ids with their fused scores, highest first.