Typesense alternative

Narsil vs Typesense

The benchmark harness measured Narsil and Typesense for ranking quality, speed, and ingest, and Narsil leads in every comparison.

11×

Typesense's rate

11,792Narsil Rust searches a second

On DBpedia 1M keyword search with equal settings, Narsil answers 11 times as many searches a second as Typesense.

  • Narsil Rust11,792
  • Narsil TypeScript8,459
  • Typesense1,052

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 Typesense 30.2.

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

What each engine is for

Typesense

Typesense is an open source search engine written in C++ that keeps its index in memory. It focuses on typo-tolerant search as you type, and you can deploy it yourself or use Typesense Cloud.

Narsil

Narsil ranks keyword results with BM25 and adds vector, hybrid, and geo search on the same typed index. You can embed it in a TypeScript, Python, Go, or Rust process, or you can deploy the same engine as a server with a REST API.

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.

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
Typesense0.5500.7512,11513.0764.10333330 to 334
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
Typesense0.2420.2091,9680.829.804,3554,333 to 4,364
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
Typesensen/an/a9,0981.2018.603,4293,426 to 3,438
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
Typesensen/an/a7,6102.7349.481,0521,048 to 1,067

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.

Where Narsil is better

  • Narsil ranks keyword results with BM25, calibrated against Anserini, the Lucene toolkit for information-retrieval research.
  • 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.
  • Narsil keeps text, vectors, and coordinates in one typed index, so a single query can combine text, vector, and geo conditions.

Of the 28 measurements that the harness recorded for both engines, Narsil came out ahead in 28 and Typesense in 0.

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 Typesense is better

  • Typesense replicates its index across a cluster of nodes, so searches keep returning results when one node fails.
  • Typesense Cloud operates Typesense clusters for you.
  • Typesense provides an adapter for InstantSearch, so you can build a search interface from ready-made components.

Measurements that Typesense won

The harness recorded no measurement in which Typesense came out ahead.

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 typesense