Elasticsearch alternative

Narsil vs Elasticsearch

The benchmark harness measured Narsil and Elasticsearch for ranking quality, speed, and ingest. Every result is here, including Elasticsearch's wins.

1.8×

Elasticsearch's rate

1,614Narsil Rust searches a second

On DBpedia 1M hybrid search with equal settings, Narsil answers 1.8 times as many searches a second as Elasticsearch.

  • Narsil Rust1,614
  • Narsil TypeScript1,304
  • Elasticsearch904

The DBpedia 1M set contains no human relevance judgements, so the harness reports no nDCG@10 for it.

The harness recorded these figures in run 20261119T135007Z on 19 November 2026, with Narsil built from commit 3ad47df2c9c1.

The harness measured Narsil 0.4.5 against Elasticsearch 9.5.6.

The harness tested Narsil TypeScript on GCP c3-standard-8, us-central1-a; Narsil Rust on GCP c3-standard-8, us-east1-b; and Elasticsearch on GCP c3-standard-8, us-east4-a, each on the processor that its machine reports as Intel(R) Xeon(R) Platinum 8481C CPU @ 2.70GHz.

What each engine is for

Elasticsearch

Elasticsearch is the distributed search and analytics engine from Elastic, and it is built on Apache Lucene. Teams use it for application search, and they also use it to search and analyse logs, metrics, and security events across large clusters.

Narsil

Narsil is an open source search engine for application search, with full-text, vector, hybrid, and geo search on one typed index. You can embed it in your application process or deploy it as a server with a REST API, and the TypeScript, Python, Go, and Rust packages all read the same index format.

Equal settings

Every engine stores full-precision vectors. On the vector track, the harness raises each engine's search effort until that engine reaches an ANN recall@10 of 0.99, before it measures the engine's speed.

Keyword search

Equal settings, Keyword search
DatasetEngineRanking qualitynDCG@10Relevant foundRecall@100Ingest speedIngest docs/sMedian searchp50 msSlowest 1%p99 msPeak throughputPeak QPS
SciFactNarsil TypeScript0.6810.9254,4210.340.8034,19834,169 to 34,213
Narsil Rust0.6810.9257,5290.260.4056,31556,271 to 56,361
Elasticsearch0.6790.9253,7092.113.147,2087,191 to 7,237
NFCorpusNarsil TypeScript0.3280.2494,4020.320.7151,46251,319 to 51,564
Narsil Rust0.3280.2496,7170.220.3194,225+93,724 to 94,639
Elasticsearch0.3220.2466,9140.721.1013,68213,677 to 13,711
DBpedia 100KNarsil TypeScriptn/an/a18,0390.300.6433,05432,983 to 33,102
Narsil Rustn/an/a35,6930.240.5253,51053,422 to 53,637
Elasticsearchn/an/a43,4380.781.1412,61312,538 to 12,641
DBpedia 1MNarsil TypeScriptn/an/a18,5120.542.128,4598,380 to 8,498
Narsil Rustn/an/a22,0320.581.9911,79211,749 to 11,803
Elasticsearchn/an/a46,8210.911.657,7897,766 to 7,792

A highlighted figure is the best in its column for that dataset.

p50 is the median search time and p99 is the time within which 99% of searches finished, as the client measured them. The table shows each peak with its 95% interval.

A + after a peak means that the load generator reached its limit before the engine did, so the engine's real peak is at least that figure.

The tables show n/a for nDCG@10 and Recall@100 on the DBpedia sets, because those sets contain no human relevance judgements.

Vector search

Equal settings, Vector search
DatasetEngineRanking qualitynDCG@10Relevant foundRecall@100Vector accuracyANN recall@10Ingest speedIngest docs/sMedian searchp50 msSlowest 1%p99 msPeak throughputPeak QPS
SciFactNarsil TypeScript0.6240.9230.9961,6910.460.8216,93116,925 to 16,999
Narsil Rust0.6240.9230.9962,3740.370.4927,16227,054 to 27,221
Elasticsearch0.6240.9230.9941,1251.001.928,4938,246 to 8,527
NFCorpusNarsil TypeScript0.3150.3090.9941,5640.500.9313,79913,794 to 14,027
Narsil Rust0.3150.3090.9912,2730.440.5421,23821,167 to 21,265
Elasticsearch0.3150.3090.9901,2301.111.327,2887,138 to 7,290
DBpedia 100KNarsil TypeScriptn/an/a0.9918501.492.183,5893,567 to 3,592
Narsil Rustn/an/a0.9918861.411.934,7944,660 to 5,195
Elasticsearchn/an/a0.9925623.064.991,9551,921 to 1,965
DBpedia 1MNarsil TypeScriptn/an/a0.9927433.454.791,6591,631 to 1,663
Narsil Rustn/an/a0.9928783.184.371,9711,849 to 2,005
Elasticsearchn/an/a0.9915035.7510.891,1181,100 to 1,133

A highlighted figure is the best in its column for that dataset.

p50 is the median search time and p99 is the time within which 99% of searches finished, as the client measured them. The table shows each peak with its 95% interval.

The tables show n/a for nDCG@10 and Recall@100 on the DBpedia sets, because those sets contain no human relevance judgements.

Hybrid search

Equal settings, Hybrid search
DatasetEngineRanking qualitynDCG@10Relevant foundRecall@100Ingest speedIngest docs/sMedian searchp50 msSlowest 1%p99 msPeak throughputPeak QPS
SciFactNarsil TypeScript0.7050.9641,9890.681.0711,83511,798 to 11,838
Narsil Rust0.7050.9642,3330.500.6319,99819,936 to 20,005
Elasticsearch0.7080.9611,4542.232.983,6783,673 to 3,721
NFCorpusNarsil TypeScript0.3560.3241,5900.631.0211,60411,578 to 11,613
Narsil Rust0.3560.3242,0930.490.6318,91318,884 to 18,916
Elasticsearch0.3520.3221,1791.611.904,5554,523 to 4,585
DBpedia 100KNarsil TypeScriptn/an/a8551.622.373,2183,172 to 3,228
Narsil Rustn/an/a8791.461.984,6474,423 to 4,736
Elasticsearchn/an/a5513.535.391,5621,558 to 1,579
DBpedia 1MNarsil TypeScriptn/an/a7044.016.181,3041,280 to 1,310
Narsil Rustn/an/a8803.765.501,6141,596 to 1,650
Elasticsearchn/an/a4456.5111.80904896 to 917

A highlighted figure is the best in its column for that dataset.

p50 is the median search time and p99 is the time within which 99% of searches finished, as the client measured them. The table shows each peak with its 95% interval.

The tables show n/a for nDCG@10 and Recall@100 on the DBpedia sets, because those sets contain no human relevance judgements.

Each engine stores vectors in the compressed form that its documentation recommends for production, which the Vector storage column shows. However, each engine has to reach an ANN recall@10 of 0.99 before the harness measures its speed.

Vector search

Recommended production settings, Vector search
DatasetEngineRanking qualitynDCG@10Relevant foundRecall@100Vector accuracyANN recall@10Vector storageIngest speedIngest docs/sMedian searchp50 msSlowest 1%p99 msPeak throughputPeak QPS
SciFactNarsil TypeScript0.6240.9230.993OSQ 4-bit2,1000.390.7615,80915,756 to 15,840
Narsil Rust0.6240.9230.995OSQ 4-bit2,3670.340.4730,67130,602 to 30,696
Elasticsearch0.6240.9230.991BBQ1,4311.051.237,6567,553 to 7,680
NFCorpusNarsil TypeScript0.3150.3090.993OSQ 4-bit1,5620.430.8013,30913,273 to 13,336
Narsil Rust0.3150.3090.993OSQ 4-bit1,9950.410.5423,79523,768 to 23,836
Elasticsearch0.3150.3090.985BBQ1,3961.241.615,917below target
DBpedia 100KNarsil TypeScriptn/an/a0.992OSQ 4-bit8180.861.385,5225,462 to 5,536
Narsil Rustn/an/a0.991OSQ 4-bit8790.781.019,3419,285 to 9,465
Elasticsearchn/an/a0.992BBQ5872.243.003,0103,009 to 3,046
DBpedia 1MNarsil TypeScriptn/an/a0.992OSQ 4-bit5421.582.333,7663,586 to 3,931
Narsil Rustn/an/a0.992OSQ 4-bit8821.772.363,8473,716 to 3,879
Elasticsearchn/an/a0.994BBQ5554.998.161,4791,476 to 1,491

A highlighted figure is the best in its column for that dataset.

p50 is the median search time and p99 is the time within which 99% of searches finished, as the client measured them. The table shows each peak with its 95% interval.

Below target marks an engine that missed the recall target, so the verdicts further down omit its speed.

The tables show n/a for nDCG@10 and Recall@100 on the DBpedia sets, because those sets contain no human relevance judgements.

Hybrid search

Recommended production settings, Hybrid search
DatasetEngineRanking qualitynDCG@10Relevant foundRecall@100Vector storageIngest speedIngest docs/sMedian searchp50 msSlowest 1%p99 msPeak throughputPeak QPS
SciFactNarsil TypeScript0.7050.964OSQ 4-bit2,0120.610.9210,57210,571 to 10,709
Narsil Rust0.7050.964OSQ 4-bit2,3980.470.6121,78221,769 to 21,888
Elasticsearch0.7060.961BBQ1,5371.832.333,6103,586 to 3,619
NFCorpusNarsil TypeScript0.3560.324OSQ 4-bit1,6260.610.9510,78410,711 to 10,926
Narsil Rust0.3560.324OSQ 4-bit1,9390.430.5821,49421,487 to 21,504
Elasticsearch0.3520.321BBQ1,3841.721.994,0564,051 to 4,057
DBpedia 100KNarsil TypeScriptn/an/aOSQ 4-bit8121.021.624,7894,749 to 4,795
Narsil Rustn/an/aOSQ 4-bit8760.911.218,4338,425 to 8,540
Elasticsearchn/an/aBBQ5112.803.612,3672,353 to 2,377
DBpedia 1MNarsil TypeScriptn/an/aOSQ 4-bit5722.566.422,4922,471 to 2,508
Narsil Rustn/an/aOSQ 4-bit8812.494.142,7562,752 to 2,761
Elasticsearchn/an/aBBQ5435.739.241,2081,200 to 1,214

A highlighted figure is the best in its column for that dataset.

p50 is the median search time and p99 is the time within which 99% of searches finished, as the client measured them. The table shows each peak with its 95% interval.

The tables show n/a for nDCG@10 and Recall@100 on the DBpedia sets, because those sets contain no human relevance judgements.

Where Narsil is better

  • Narsil can work inside your application process, where it answers each search without a network call. Once you need a server, a Narsil server can load that same index without any change.
  • The same engine works in a browser and stores its index in IndexedDB, so your users can search while their device is offline.
  • Narsil keeps text, vectors, and coordinates in one typed index, so a single query can combine text, vector, and geo conditions.

Of the 136 measurements that the harness recorded for both engines, Narsil came out ahead in 117 and Elasticsearch in 11, while 8 came out level.

A peak is level when the two 95% intervals overlap, or when the load generator capped the lower peak, because that figure is then a lower bound. Every other measure is level when the tables above show the same figure for both engines.

Where Elasticsearch is better

  • Elastic builds its observability and security products on Elasticsearch, whose aggregations can summarise large volumes of log, metric, and security events.
  • Elastic maintains Kibana for dashboards, along with official client libraries for many languages.
  • Elasticsearch has a long record in production, so its documentation and community forums cover many of the operational problems that a team can meet.
  • Elastic sells Elasticsearch as a managed service, Elastic Cloud, so you can search without operating a cluster yourself.

Measurements that Elasticsearch won

Try Narsil

When you paste this prompt into your coding agent, the agent will install the Narsil skill and the package, then build and test the search that your project needs.

See what your agent does with it

If you prefer to write the code yourself, you can use the Narsil package for TypeScript, Python, Go, or Rust, since every package searches with the same engine. Each program indexes three films and finds the films from 1990 onwards whose title matches ronin, before it finds the two films whose embeddings are closest to a query vector.

Serve Narsil over HTTP
pnpm add @delali/narsil
import { createNarsil } from '@delali/narsil'
 
const narsil = await createNarsil()
 
await narsil.createIndex('films', {
  schema: { title: 'string', year: 'number', embedding: 'vector[3]' },
})
 
await narsil.insertBatch('films', [
  { id: 'heat', title: 'Heat', year: 1995, embedding: [0.9, 0.1, 0.2] },
  { id: 'ronin', title: 'Ronin', year: 1998, embedding: [0.8, 0.3, 0.1] },
  { id: 'solaris', title: 'Solaris', year: 1972, embedding: [0.1, 0.9, 0.7] },
])
 
const keyword = await narsil.query('films', { term: 'ronin', filters: { fields: { year: { gte: 1990 } } } })
console.log(keyword.count, keyword.hits[0].id)
 
const nearest = await narsil.query('films', {
  vector: { field: 'embedding', value: [0.85, 0.2, 0.15] },
  limit: 2,
})
for (const hit of nearest.hits) {
  console.log(hit.id, hit.score)
}
 
await narsil.shutdown()

Reproduce these numbers

The benchmark harness is in the Narsil repository, where it writes every figure that it measures into a new run directory.

git clone https://github.com/assetcorp/narsil.git
cd narsil/benchmarks/server
./run-all.sh narsil narsil-rust elasticsearch