Hybrid search that runs inside your application.
Hinny is an embedded search database written in Rust. Full text, vectors, learned sparse terms and filters in one query, fused into one ranking. A library for Rust, Python, Node.js and C: no server to run.
Coming soon. First release in development.
The kinds of search
docs.query(
text="apartment lease"
)Full textBM25 with block-max MaxScore over bit-packed posting lists. Stemming in 18 languages.docs.query(
vector=embedding
)Vectors1-bit RaBitQ codes over clusters, reranked at half precision only where the error bound says it matters.docs.query(
sparse={"terms": weights}
)Learned sparseTerm weights from SPLADE-style models, scored on the same posting lists as BM25.docs.query(
filter=attr("year") >= 2025
)FiltersRanges, sets, prefixes and boolean logic over attributes, checked inside the search, before a document can enter the top 10.hits = docs.query( text="apartment lease", vector=embedding, filter=attr("year") >= 2025, ) # one rankingHybridOne query runs them together, with the same filter inside each, and fuses their scores into one ranking.
Architecture
Inside the engine.
How a query runs, how a write is kept, and what each choice measured.
Truly hybrid
The retrievers aren't separate searches for your application to merge. One query runs them at once, checks the same filter inside each, and fuses their scores in the engine.
No server
Hinny is a library inside your application's process. A query is a function call, not a request over a network.
Many at a time
No stage of a query handles one document at a time. Filters, posting lists and vector codes are all processed in blocks.
One bit a dimension
A query scans vectors as 1-bit codes and reads the full vector only where the error bound says it must: 0.04% of a million.
Readers never wait
A query reads an immutable view and takes no lock, so writing and searching don't slow each other down.
A log and segments
A write is in the log and searchable when it returns. Immutable segments are written and merged in the background.
Survives a crash
Kill the process mid-write. Every write it had acknowledged is there when you reopen, whole and in order.
The figures are from the engine's design notes and its tests. The million vectors are synthetic (256 dimensions, clustered), searched at recall@10 0.997. The 80,000 writes are documents with 384-dimension vectors, written one at a time while another thread queries without pause. Development results: first release in development.
About the name
A hinny is a hybrid.
So is every query.
A hinny is the hybrid of a horse and a donkey. Hinny is the hybrid of two kinds of search: words find exact names, codes and numbers, and vectors find what is meant when the words differ. One query runs both and returns one ranking.