Expand description
mmap-backed runtime for .urna files.
Owns the mmap so MmapUrnaFile is 'static. Section metadata is parsed
once at open time using UrnaView, then the mmap is moved into Self
and embeddings are read directly from &self._mmap[offset..].
Supports float32 / float16 / int8 dtypes with a SIMD dispatcher
(AVX2 / NEON / scalar). Optional ANN (hnsw) and lexical (bm25)
sections rerank into the exact cosine path so the final score is
always the real cosine value.
Re-exports§
pub use error::RuntimeError;pub use simd::SimdBackend;
Modules§
- ann
- Pure-Rust HNSW index for approximate nearest neighbor search.
- bm25
- tiny BM25 inverted index for the hybrid search path.
- error
- graph
- chunk-to-chunk graph runtime (G1). mirrors
ann: a flat csr is parsed off the graph_adjacency (0x0C) section at open time and walked with zero allocation.bounded_bfsGENERATES candidate chunk ordinals seeded from the exact-cosine top-k; the candidates are handed to the SAME mandatory exact rerank (score_subset) so a graph edge can never leak into a returned score. recall staysf32::NAN(we never lie). - simd
- SIMD-accelerated dot products for the search hot path.
Structs§
- Mmap
Urna File - Search
Explain - ADDITIVE per-search provenance, attached to every
SearchResult. zero format bytes, noURNA_FORMAT_VERSIONbump: it is computed entirely in the runtime from the search path and the open file. feeds the lens--disclose explainhonesty line and the agent-nativeretrieve()answer-pack. the load-bearing field isrerank_source. - Search
Hit - Search
Result
Enums§
- DType
- Runtime view of the embeddings section dtype.
- Rerank
Source Kind - What precision the mandatory exact-cosine rerank read its vectors from.
the honesty backbone of
--disclose explainandretrieve(): every returnedscoreIS a real cosine, but at WHICH precision depends on whether a full-precisionembeddings_fp(0x09) slab is present.
Functions§
- apply_
blob_ span_ overlay - The per-chunk source spans as a query reports them: the decoded 0x03
spans with the 0x16 overlay applied, exactly what
MmapUrnaFile::opendoes.urna citeresolves through this so a media corpus cites the blob uri and its byte range, the span search hits andretrieveprint, and not the row ordinal the forge writes into 0x03. without the overlay (or theblobs_presentcapability) the spans are left as decoded.