← Benchmarks

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.

FlexSearchOut of memory while indexing (8 GB heap limit)
Fuse.jsSearch timed out (5 min budget), 69/200 queries · partial 3.8 s
  • ZBSearch
  • Other engines

All metrics, 160,000 passages

Large-index results for 160,000 passages, every engine and metric
EngineStatusIndexingDocs/sFreezeHeapRSSp50p95p99QPSQueries
OramaCompleted26 s6,161-2.45 GB3.45 GB1.2 s3.9 s4.5 s0.7200/200
ZBSearch (BM25)Completed6.4 s25,126-1.45 GB2.44 GB6.37 ms57 ms83 ms67200/200
ZBSearch (BM25, frozen)Completed9.0 s17,7542.5 s99.9 MB2.53 GB3.63 ms24 ms31 ms152200/200
ZBSearch (QPS)Completed7.8 s20,411-1.74 GB2.57 GB76 ms181 ms235 ms12200/200
ZBSearch (PT15)Completed19 s8,256-2.12 GB2.99 GB29 ms111 ms141 ms26200/200
FlexSearchOut of memory while indexing (8 GB heap limit)----------
Fuse.jsSearch timed out (5 min budget), 69/200 queries4.2 s38,182-1.29 GB1.46 GB3.8 s5.9 s6.3 s0.369/200
LunrCompleted1.1 min2,467-5.97 GB6.47 GB284 ms8.8 s11 s0.8200/200
MiniSearchCompleted18 s8,854-1.01 GB1.69 GB47 ms179 ms212 ms18200/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 versions and what each engine stores besides its index
EngineVersionStores besides the index
Orama3.1.18full documents (default document store)
ZBSearch (BM25)4.0.3documents without text (store: { exclude: ['text'] })
ZBSearch (BM25, frozen)4.0.3documents without text (store: { exclude: ['text'] })
ZBSearch (QPS)4.0.3full documents (the QPS index does not support store.exclude)
ZBSearch (PT15)4.0.3full documents (the PT15 index does not support store.exclude)
FlexSearch0.8.212ids only (no document store)
Fuse.js7.5.0full documents (Fuse searches its own document list)
Lunr2.3.9refs only
MiniSearch7.2.0ids 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.