Skip to main content

Module search

Module search 

Source
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 SQLite FTS5
  • Hybrid Search: Combines both using Reciprocal Rank Fusion
  • HNSW Index: Optional scalable approximate nearest neighbor search (requires usearch-hnsw feature)

Re-exports§

pub use hnsw::HnswConfig;
pub use hnsw::HnswIndex;
pub use hnsw::HnswResult;

Modules§

hnsw
HNSW (Hierarchical Navigable Small World) vector index.

Structs§

EmbeddingModelInfo
Information about embedding model versions for a buffer.
IncrementalEmbedResult
Result of an incremental embedding operation.
RrfConfig
Configuration for RRF algorithm.
SearchConfig
Configuration for hybrid search.
SearchResult
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.