Large indexes
How long each engine takes to index 20k, 80k, 160k passages, how much memory the index holds and how fast it answers, with a time limit on indexing and on search.
Results by index size
160,000 passages · 200 queries
Every engine indexes the same passages in its own process. Engines that run out of time or memory stay in the chart, marked with what stopped them.
Median latency of the query set. Lower is better.
- ZBSearch
- Other engines
All metrics, 160,000 passages
| Engine | Status | Indexing | Docs/s | Freeze | Heap | RSS | p50 | p95 | p99 | QPS | Queries |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Orama | Completed | 26 s | 6,161 | - | 2.45 GB | 3.45 GB | 1.2 s | 3.9 s | 4.5 s | 0.7 | 200/200 |
| ZBSearch (BM25) | Completed | 6.4 s | 25,126 | - | 1.45 GB | 2.44 GB | 6.37 ms | 57 ms | 83 ms | 67 | 200/200 |
| ZBSearch (BM25, frozen) | Completed | 9.0 s | 17,754 | 2.5 s | 99.9 MB | 2.53 GB | 3.63 ms | 24 ms | 31 ms | 152 | 200/200 |
| ZBSearch (QPS) | Completed | 7.8 s | 20,411 | - | 1.74 GB | 2.57 GB | 76 ms | 181 ms | 235 ms | 12 | 200/200 |
| ZBSearch (PT15) | Completed | 19 s | 8,256 | - | 2.12 GB | 2.99 GB | 29 ms | 111 ms | 141 ms | 26 | 200/200 |
| FlexSearch | Out of memory while indexing (8 GB heap limit) | - | - | - | - | - | - | - | - | - | - |
| Fuse.js | Search timed out (5 min budget), 69/200 queries | 4.2 s | 38,182 | - | 1.29 GB | 1.46 GB | 3.8 s | 5.9 s | 6.3 s | 0.3 | 69/200 |
| Lunr | Completed | 1.1 min | 2,467 | - | 5.97 GB | 6.47 GB | 284 ms | 8.8 s | 11 s | 0.8 | 200/200 |
| MiniSearch | Completed | 18 s | 8,854 | - | 1.01 GB | 1.69 GB | 47 ms | 179 ms | 212 ms | 18 | 200/200 |
Italic latencies are partial: the queries that completed before the search timeout. A dash means the phase did not complete.
Run details
- Machine
- Apple M5 Pro × 15, 24 GB RAM
- Runtime
- Node.js v26.10.0, 8 GB heap limit
- Measured
- 2026-11-11
- Sizes
- 20k, 80k, 160k passages
- Indexing timeout
- 10 min
- Search timeout
- 5 min for 200 queries, 1 min per query
| Engine | Version | Stores besides the index |
|---|---|---|
| Orama | 3.1.18 | full documents (default document store) |
| ZBSearch (BM25) | 4.0.3 | documents without text (store: { exclude: ['text'] }) |
| ZBSearch (BM25, frozen) | 4.0.3 | documents without text (store: { exclude: ['text'] }) |
| ZBSearch (QPS) | 4.0.3 | full documents (the QPS index does not support store.exclude) |
| ZBSearch (PT15) | 4.0.3 | full documents (the PT15 index does not support store.exclude) |
| FlexSearch | 0.8.212 | ids only (no document store) |
| Fuse.js | 7.5.0 | full documents (Fuse searches its own document list) |
| Lunr | 2.3.9 | refs only |
| MiniSearch | 7.2.0 | ids only (no storeFields) |
Methodology
The corpus is the synthetic passage set used for ZBSearch's own large-index work: passages of 150 to 250 words drawn from a Zipf-distributed vocabulary of 40,000 words, with a 3-word section and a 6-word title. Every engine indexes text, section and title as full text, with the configuration of the throughput benchmarks (English stop words, sort indexes off), and keeps as little of each document as its API allows (see the table above).
The query set is 200 queries of 1 to 3 Zipf-sampled words, after 10 warm-up queries. Every engine is asked for the top 10 documents that contain all the query terms, one query at a time (the QPS and PT15 plugins do not apply this all-terms threshold and match any term; ZBSearch and Orama also match terms as prefixes, their default); QPS is the inverse of the mean latency. Heap is heapUsed plus arrayBuffers after indexing and a full garbage collection, minus the process baseline, so it counts the index and the stored documents but not the generated corpus. RSS, in the table, also counts memory the process has not returned to the operating system, the generated corpus included.
ZBSearch (BM25, frozen) is ZBSearch (BM25) followed by freeze(db), which compacts the full-text index into immutable segments; the freeze time is part of its indexing time and is also shown on its own. The QPS and PT15 plugins keep full documents, because their index components do not support store.exclude.
Each engine and size runs in its own Node.js process. The parent process kills it when indexing takes longer than 10 min, when the warm-up and measured queries take longer than 5 min in total, or when a single query takes longer than 1 min. The child reports every query as it completes, so a search timeout keeps the latencies of the queries that finished. A process that runs out of its heap is reported as out of memory.
Run it yourself with pnpm --filter benchmarks benchmark:large-index-engines; the script is benchmarks/large-index-engines.js. Absolute numbers depend heavily on the machine: compare engines within one run.