Expand description
Hybrid search engine: BM25 + vector similarity + Reciprocal Rank Fusion.
Structs§
- Bm25Hit
- A BM25 search hit from FTS5.
- Search
Omission Receipt - SEM-001: Receipt for rows skipped during degraded search.
- Vector
Hit - A vector search hit.
- Vector
Search Outcome
Enums§
- Search
Corruption Policy - SEM-001: Search corruption policy — strict or degraded.
Functions§
- brute_
force_ vector_ outcome - cosine_
similarity - Compute cosine similarity between two vectors.
- deduplicate_
results - Deduplicate results by (source_type, source_id), keeping the first occurrence.
- fts_
only_ search - Full-text search only (no embeddings needed). Synchronous.
- hybrid_
search - Perform a hybrid search (BM25 + vector + RRF).
- hybrid_
search_ explained - Perform a hybrid search and return the exact score decomposition.
- hybrid_
search_ explained_ with_ hnsw - Perform a hybrid HNSW-backed search and return the exact score decomposition.
- hybrid_
search_ with_ hnsw - Perform a hybrid search using pre-computed HNSW hits for the vector component.
- per_
dim_ vector_ outcome - rrf_
fuse - Fuse BM25 and vector results via Reciprocal Rank Fusion.
- rrf_
fuse_ with_ context - sanitize_
fts_ query - Sanitize a raw query string for safe use in an FTS5 MATCH expression.
- source_
dedup_ key - vector_
only_ search - Vector-only search. Called after embedding the query.
- vector_
only_ search_ with_ hnsw - Vector-only search using pre-computed HNSW hits.