Expand description
Hybrid search with semantic and lexical retrieval.
Combines vector similarity search with FTS5 BM25 using Reciprocal Rank Fusion (RRF).
§Features
- Semantic Search: Vector similarity using embeddings
- BM25 Search: Full-text search using
SQLiteFTS5 - Hybrid Search: Combines both using Reciprocal Rank Fusion
- HNSW Index: Optional scalable approximate nearest neighbor search (requires
usearch-hnswfeature)
Re-exports§
pub use hnsw::HnswConfig;pub use hnsw::HnswIndex;pub use hnsw::HnswResult;
Modules§
- hnsw
- HNSW (Hierarchical Navigable Small World) vector index.
Structs§
- Embedding
Model Info - Information about embedding model versions for a buffer.
- Incremental
Embed Result - Result of an incremental embedding operation.
- RrfConfig
- Configuration for RRF algorithm.
- Search
Config - Configuration for hybrid search.
- Search
Result - Search result with chunk ID and combined score.
Constants§
- DEFAULT_
PREVIEW_ LEN - Default preview length in characters.
- DEFAULT_
SIMILARITY_ THRESHOLD - Default similarity threshold for semantic search.
- DEFAULT_
TOP_ K - Default number of results to return.
Functions§
- buffer_
fully_ embedded - Checks if a buffer has all chunks embedded.
- check_
model_ mismatch - Checks if existing embeddings were created with a different model.
- embed_
buffer_ chunks - Generates and stores embeddings for all chunks in a buffer.
- embed_
buffer_ chunks_ incremental - Incrementally embeds chunks in a buffer.
- get_
embedding_ model_ info - Gets embedding model information for a buffer.
- hybrid_
search - Performs hybrid search combining semantic and BM25 results.
- populate_
previews - Populates content previews for search results.
- reciprocal_
rank_ fusion - Performs Reciprocal Rank Fusion on multiple ranked lists.
- search_
bm25 - Performs BM25-only search.
- search_
semantic - Performs semantic-only search.
- weighted_
rrf - Performs weighted RRF where each list has a weight.