How SeekStorm is built
SeekStorm is an open-source, sub-millisecond vector & lexical search library and multi-tenancy server, implemented in Rust. Scalability and performance are the two fundamental design goals: index size and latency grow linearly with the number of indexed documents, while RAM consumption stays constant.
Five architectural decisions get it there: a dual-engine core for hybrid search, a sharded index that turns every processor core into its own mini search engine, N-gram indexing that moves phrase matching from query time to index time, a clustered IVF index for vector search, and a simple, inspectable on-disk layout.
Dual engine architecture for hybrid search
SeekStorm doesn't retrofit vector search onto a lexical index, or bolt keyword search onto a vector database. It runs two separate, first-class, native index architectures under one roof — an inverted index for lexical relevance and an ANN index for vector similarity — and lets a query planner decide how to combine them.
Both engines share a document store and a document ID space, but keep separate storage layouts, indexing, search, and scoring. The query planner exposes 6 dedicated QueryModes and FusionTypes, selectable automatically or manually, and returns the active mode for explainability. Results from both engines are merged with Reciprocal Rank Fusion (RRF) — the user only ever sees a single, unified index.
Fast, precise, exact, language independent — the right tool for proper names, numbers, license plates, and phrase matching. Struggles with meaning and synonymy.
Understands similarity and topic — but is language dependent, slower, and can't handle terms it wasn't trained on.
N-gram indexing for faster phrase search
A phrase query like "the who" is expensive with a plain inverted index: both terms are frequent, their posting lists are long, and the engine has to intersect two long lists and then check that the positions are actually adjacent. SeekStorm instead indexes bigrams and trigrams of frequent terms directly, moving that intersection and phrase check from query time to index time.
Frequent terms — what other engines call stop words — are the ones worth combining into N-grams: there are only a handful of them, so the extra index size stays small, while their posting lists are the longest and most expensive to intersect. Restricting N-grams to adjacent frequent terms keeps the index cost negligible while accelerating exactly the queries — like "the who" or "to be or not to be" — that would otherwise be slowest.
Measured impact: phrase queries saw mean latency improve by 2.18×, p99.9 tail latency by 7.63×, and some individual phrase queries sped up by up to 3 orders of magnitude — with BM25 scores staying almost identical to single-term indexing.
Lexical search
The steps below cover the lexical engine specifically — the inverted-index side of the dual engine. The vector engine has its own, separate search path, covered in Vector search below.
On the lexical side, SeekStorm processes posting lists Document-at-a-Time (DaaT) rather than Term-at-a-Time, so it never materializes long intermediate result lists in RAM and can stream results — which is what makes huge indices tractable. Intersection and union of roaring-bitmap posting lists are SIMD-accelerated (AVX2 / NEON), combined with galloping intersection and a faster-than-Block-Max WAND for early termination, plus N-gram lookups for frequent-term phrases.
Vector search: sharded & leveled IVF index
The vector engine reuses the same sharding and leveling principle as the lexical engine — one shard per processor core, one level per 64k committed documents — but builds a different kind of sub-index on top of it: an IVF (Inverted File) index, clustered with K-Medoid (PAM — Partition Around Medoids) rather than K-Means.
PAM picks actual data points as cluster centers (medoids) instead of averaging vectors into synthetic centroids the way K-Means does. That tends to produce better-quality clusters, but PAM is more expensive to compute than K-Means at scale. By clustering only within a single 64k-document level of a single shard — never the whole index at once — SeekStorm keeps the clustering cost per sub-index manageable while still gaining K-Medoid's better cluster quality, without giving up the scalability that comes from sharding.
At query time, Approximate Nearest Neighbor Search (ANNS) probes the nearest medoids in each level's IVF sub-index (the nprobe parameter controls the recall/latency trade-off), in parallel across shards and levels — the same fan-out-and-aggregate pattern used for lexical search. Field filters are applied directly during vector search rather than as a post-search step, so filtered queries don't waste candidates on documents that would be discarded anyway.
Multi-vector indexing from multiple fields and multiple chunks per field. Integrated inference generates embeddings directly from text via Model2Vec, or externally generated embeddings can be imported. Chunking respects sentence boundaries and Unicode segmentation for multilingual text.
F32 and I8 vector precisions, with TurboQuant (TQ) and affine Scalar Quantization (SQ) for compression. Cosine similarity, dot product, and Euclidean distance are all supported similarity measures, SIMD-accelerated (AVX2) for quantization and similarity calculation.
On-disk storage layout
Every SeekStorm index is a self-contained directory tree, with no external dependencies or database engines. At every commit (auto or manual), the index is serialized to disk for persistence. Every index directory follows the same predictable hierarchy: API keys at the top, indices below each key, shards below each index, and levels (64k-document batches) below each shard. Levels are collected in RAM and committed to disk — becoming immutable — once the threshold is reached. It's a plain directory tree, so backup and restore is just a file copy.
The index can be kept fully in RAM for zero disk access at search time, or memory-mapped for minimal RAM use at slightly higher latency — both modes share the identical file format, so an existing index can switch access mode at any time. Posting lists are roaring-bitmap compressed; term positions are delta-compressed and VINT-encoded; documents are Zstandard-compressed JSON.