Embeddable hybrid-search primitives in zero-dependency Rust —
BM25 keyword search, an HNSW vector index, and reciprocal-rank fusion. Type a query and watch
all three lanes rank the same corpus, so you can see why hybrid wins.
Live, in-process, no model server: the vector lane uses a deterministic
feature-hash embedding computed in pure Rust. ·
Source on GitHub
Try:
BM25 keyword exact term match
Inverted index + Okapi BM25. Precise when your words match the document's
words — brittle when they don't.
Run a search to see results.
Vector (HNSW) meaning match
Approximate nearest neighbors over embeddings, cosine distance. Recovers
paraphrases and synonyms the keyword lane misses.
Run a search to see results.
Hybrid (RRF) best of both
Reciprocal-rank fusion merges the two rankings with no score calibration.
Badges show which legs found each hit.