Skip to the content
hinny

Reference

How Hinny works

Follow a write and a query through a namespace.

Inside a namespace

Full text
Block-max MaxScore BM25 over bit-packed postings. Snowball stemming in 18 languages.
Vectors
1-bit RaBitQ codes over shared clusters, reranked from f16 rows only when the error bound requires it. Cosine, Euclidean, and dot product.
Learned sparse
SPLADE-style term weights scored by dot product on the same posting lists as BM25.
Filters
Ranges, sets, prefixes, globs, tags, and boolean logic evaluated inside each retriever before a doc enters top k.
Writes
Atomic batches via a CRC32 write-ahead log. Searchable on return, crash-safe on SIGKILL, explicit sync() and flush() for disk durability. Readers never lock writers.
Storage
Immutable memory-mapped segments merged in the background. Versioned formats tested with 344 fault-injection cases and 40 SIGKILLs.

Write and query paths

A checksummed WAL for fresh writes, immutable memory-mapped segments for everything else, background merges, and 1-bit RaBitQ vectors reranked at half precision only when needed. Full architecture details live in DESIGN.md.

A write

  1. 1BatchAtomic upserts & deletes, one seq
  2. 2LogCRC32 record, all or nothing
  3. 3MemtableLive immediately, vectors in f16
  4. 4SegmentPostings, codes, columns flushed in background

A query

  1. 1SnapshotLock-free view of segments + memtable
  2. 2RetrieversBlock-max BM25, 1-bit RaBitQ + f16 rerank
  3. 3Fusion0–1 min-max blend (default 50/50) or RRF
  4. 4HitsRanked docs with text and snippets

Source and bindings