Skip to main content

Module hybrid

Module hybrid 

Source
Expand description

Hybrid semantic + keyword search with Reciprocal Rank Fusion (RRF).

HybridIndex wraps a SearchIndex (dense vector search) and a Bm25Index (BM25 keyword search) and fuses their ranked results via Reciprocal Rank Fusion so that chunks appearing high in either list bubble to the top of the combined ranking.

Structs§

HybridIndex
Combined semantic + keyword search index with RRF fusion.
ParseSearchModeError
Error returned when a SearchMode string cannot be parsed.

Enums§

SearchMode
Controls which retrieval strategy is used during search.

Functions§

boost_with_pagerank
Apply a multiplicative PageRank boost to search results.
boost_with_pagerank_results
boost_with_pagerank variant that operates on SearchResult directly, for callers that don’t have the raw (usize, f32) pair at hand.
pagerank_boost_factor
Sigmoid-shaped multiplicative boost factor for a single PageRank percentile in the corpus (not the raw rank value).
pagerank_lookup
Build a normalized PageRank lookup table from a [RepoGraph].
rrf_fuse
Reciprocal Rank Fusion of two ranked lists.