> Complete content index: https://narsil.sondelali.com/llms.txt

# Narsil vs Meilisearch

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

URL: https://narsil.sondelali.com/compare/meilisearch

## Headline result

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

Ratio: 8.5× (Meilisearch's rate).

- Narsil Rust: 11,792
- Narsil TypeScript: 8,459
- Meilisearch: 1,387

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 Meilisearch `1.57.0`.

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

## What each engine is for

**Meilisearch.** Meilisearch is a search engine written in Rust for search as you type, with typo tolerance turned on by default. It ranks results with a sequence of rules, such as the number of matching words and their proximity, and you can deploy it yourself or use Meilisearch Cloud.

**Narsil.** Narsil ranks keyword results with BM25, the scoring model that Lucene engines use, and it adds vector, hybrid, and geo search on the same typed index. You can embed it in your application process or deploy it 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.

| Dataset | Engine | nDCG@10 | Recall@100 | Ingest docs/s | p50 ms | p99 ms | Peak QPS |
| --- | --- | ---: | ---: | ---: | ---: | ---: | ---: |
| SciFact | Narsil TypeScript | 0.681 | 0.925 | 4,421 | 0.34 | 0.80 | 34,198 (34,169 to 34,213) |
| SciFact | Narsil Rust | 0.681 | 0.925 | 7,529 | 0.26 | 0.40 | 56,315 (56,271 to 56,361) |
| SciFact | Meilisearch | 0.502 | 0.598 | 1,450 | 2.24 | 6.41 | 2,124 (2,114 to 2,174) |
| NFCorpus | Narsil TypeScript | 0.328 | 0.249 | 4,402 | 0.32 | 0.71 | 51,462 (51,319 to 51,564) |
| NFCorpus | Narsil Rust | 0.328 | 0.249 | 6,717 | 0.22 | 0.31 | 94,225+ (93,724 to 94,639) |
| NFCorpus | Meilisearch | 0.265 | 0.155 | 1,463 | 1.19 | 2.74 | 4,166 (4,156 to 4,196) |
| DBpedia 100K | Narsil TypeScript | n/a | n/a | 18,039 | 0.30 | 0.64 | 33,054 (32,983 to 33,102) |
| DBpedia 100K | Narsil Rust | n/a | n/a | 35,693 | 0.24 | 0.52 | 53,510 (53,422 to 53,637) |
| DBpedia 100K | Meilisearch | n/a | n/a | 4,660 | 1.67 | 3.92 | 3,206 (3,205 to 3,237) |
| DBpedia 1M | Narsil TypeScript | n/a | n/a | 18,512 | 0.54 | 2.12 | 8,459 (8,380 to 8,498) |
| DBpedia 1M | Narsil Rust | n/a | n/a | 22,032 | 0.58 | 1.99 | 11,792 (11,749 to 11,803) |
| DBpedia 1M | Meilisearch | n/a | n/a | 461 | 3.29 | 11.61 | 1,387 (1,383 to 1,414) |

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.
- The same engine works in a browser and stores its index in IndexedDB, so your users can search while their device is offline.

Of the 28 measurements that the harness recorded for both engines, Narsil came out ahead in 28 and Meilisearch 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.

### nDCG@10

Narsil better in 4 of 4.

| Comparison | Narsil | Meilisearch |
| --- | ---: | ---: |
| Keyword, SciFact (Narsil TypeScript) | 0.681 | 0.502 |
| Keyword, SciFact (Narsil Rust) | 0.681 | 0.502 |
| Keyword, NFCorpus (Narsil TypeScript) | 0.328 | 0.265 |
| Keyword, NFCorpus (Narsil Rust) | 0.328 | 0.265 |

### Peak queries a second

Narsil better in 8 of 8.

| Comparison | Narsil | Meilisearch |
| --- | ---: | ---: |
| Keyword, SciFact (Narsil TypeScript) | 34,198 | 2,124 |
| Keyword, SciFact (Narsil Rust) | 56,315 | 2,124 |
| Keyword, NFCorpus (Narsil TypeScript) | 51,462 | 4,166 |
| Keyword, NFCorpus (Narsil Rust) | 94,225 | 4,166 |
| Keyword, DBpedia 100K (Narsil TypeScript) | 33,054 | 3,206 |
| Keyword, DBpedia 100K (Narsil Rust) | 53,510 | 3,206 |
| Keyword, DBpedia 1M (Narsil TypeScript) | 8,459 | 1,387 |
| Keyword, DBpedia 1M (Narsil Rust) | 11,792 | 1,387 |

### Median client latency, ms

Narsil better in 8 of 8.

| Comparison | Narsil | Meilisearch |
| --- | ---: | ---: |
| Keyword, SciFact (Narsil TypeScript) | 0.34 | 2.24 |
| Keyword, SciFact (Narsil Rust) | 0.26 | 2.24 |
| Keyword, NFCorpus (Narsil TypeScript) | 0.32 | 1.19 |
| Keyword, NFCorpus (Narsil Rust) | 0.22 | 1.19 |
| Keyword, DBpedia 100K (Narsil TypeScript) | 0.30 | 1.67 |
| Keyword, DBpedia 100K (Narsil Rust) | 0.24 | 1.67 |
| Keyword, DBpedia 1M (Narsil TypeScript) | 0.54 | 3.29 |
| Keyword, DBpedia 1M (Narsil Rust) | 0.58 | 3.29 |

### Documents ingested a second

Narsil better in 8 of 8.

| Comparison | Narsil | Meilisearch |
| --- | ---: | ---: |
| Keyword, SciFact (Narsil TypeScript) | 4,421 | 1,450 |
| Keyword, SciFact (Narsil Rust) | 7,529 | 1,450 |
| Keyword, NFCorpus (Narsil TypeScript) | 4,402 | 1,463 |
| Keyword, NFCorpus (Narsil Rust) | 6,717 | 1,463 |
| Keyword, DBpedia 100K (Narsil TypeScript) | 18,039 | 4,660 |
| Keyword, DBpedia 100K (Narsil Rust) | 35,693 | 4,660 |
| Keyword, DBpedia 1M (Narsil TypeScript) | 18,512 | 461 |
| Keyword, DBpedia 1M (Narsil Rust) | 22,032 | 461 |

## Where Meilisearch is better

- Meilisearch turns on typo tolerance and prefix search by default, so search as you type needs almost no configuration.
- Meilisearch provides an integration with InstantSearch, so you can build a search interface from ready-made components.
- Meilisearch Cloud operates Meilisearch for you.

Measurements that Meilisearch won:

The harness recorded no measurement in which Meilisearch 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.

```text
Read https://narsil.sondelali.com/agents.md and follow it to add Narsil search to this project.
```

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.

```bash title="pnpm" tab="TypeScript"
pnpm add @delali/narsil
```

```bash title="pip" tab="Python"
pip install delali-narsil
```

```bash title="go get" tab="Go"
go get github.com/assetcorp/narsil/packages/go/engine@v0.2.1
```

```bash title="cargo" tab="Rust"
cargo add delali-narsil
```

```ts title="films.ts" tab="TypeScript"
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()
```

```python title="films.py" tab="Python"
from narsil import Narsil

with Narsil() as engine:
    engine.create_index("films", {"schema": {"title": "string", "year": "number", "embedding": "vector[3]"}})
    engine.insert_batch(
        "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]},
        ],
    )

    keyword = engine.query("films", {"term": "ronin", "filters": {"fields": {"year": {"gte": 1990}}}})
    print(keyword["count"], keyword["hits"][0]["id"])

    nearest = engine.query("films", {"vector": {"field": "embedding", "value": [0.85, 0.2, 0.15]}, "limit": 2})
    for hit in nearest["hits"]:
        print(hit["id"], hit["score"])
```

```go title="main.go" tab="Go"
package main

import (
	"context"
	"fmt"
	"log"

	"github.com/assetcorp/narsil/packages/go/engine"
)

func main() {
	if err := run(context.Background(), "./narsil-data"); err != nil {
		log.Fatal(err)
	}
}

func run(ctx context.Context, directory string) error {
	narsil, err := engine.New(ctx, engine.Config{
		Durability: &engine.DurabilityConfig{Directory: directory},
	})
	if err != nil {
		return err
	}
	defer narsil.Shutdown(ctx)

	err = narsil.CreateIndex(ctx, "films", engine.IndexConfig{
		Schema: engine.Schema{
			"title":     engine.FieldString,
			"year":      engine.FieldNumber,
			"embedding": engine.VectorFieldType(3),
		},
	})
	if err != nil {
		return err
	}

	_, err = narsil.InsertBatch(ctx, "films", []*engine.Document{
		engine.DocumentFromMap(map[string]any{"id": "heat", "title": "Heat", "year": 1995, "embedding": []float32{0.9, 0.1, 0.2}}),
		engine.DocumentFromMap(map[string]any{"id": "ronin", "title": "Ronin", "year": 1998, "embedding": []float32{0.8, 0.3, 0.1}}),
		engine.DocumentFromMap(map[string]any{"id": "solaris", "title": "Solaris", "year": 1972, "embedding": []float32{0.1, 0.9, 0.7}}),
	}, engine.InsertOptions{})
	if err != nil {
		return err
	}

	keyword, err := narsil.Query(ctx, "films", engine.QueryParams{
		Term: "ronin",
		Filters: &engine.FilterExpression{Fields: map[string]engine.FieldFilter{
			"year": {Gte: engine.NumberBound(1990)},
		}},
	})
	if err != nil {
		return err
	}
	fmt.Println(keyword.Count, keyword.Hits[0].ID)

	nearest, err := narsil.Query(ctx, "films", engine.QueryParams{
		Mode:   engine.SearchVector,
		Vector: &engine.VectorQueryConfig{Field: "embedding", Value: []float32{0.85, 0.2, 0.15}},
		Limit:  engine.Some(2),
	})
	if err != nil {
		return err
	}
	for _, hit := range nearest.Hits {
		fmt.Println(hit.ID, hit.Score.Or(0))
	}
	return nil
}
```

```rust title="main.rs" tab="Rust"
use narsil::{IndexConfig, Narsil, NarsilConfig, QueryParams, Value, VectorQuery, parse_json};

fn main() -> narsil::Result<()> {
    let engine = Narsil::open(NarsilConfig::default())?;
    engine.create_index(
        "films",
        IndexConfig {
            schema: parse_json(r#"{ "title": "string", "year": "number", "embedding": "vector[3]" }"#)?,
            ..IndexConfig::default()
        },
    )?;

    let films = [
        r#"{ "id": "heat", "title": "Heat", "year": 1995, "embedding": [0.9, 0.1, 0.2] }"#,
        r#"{ "id": "ronin", "title": "Ronin", "year": 1998, "embedding": [0.8, 0.3, 0.1] }"#,
        r#"{ "id": "solaris", "title": "Solaris", "year": 1972, "embedding": [0.1, 0.9, 0.7] }"#,
    ];
    let mut documents = Vec::new();
    for film in films {
        if let Value::Object(document) = parse_json(film)? {
            documents.push(document);
        }
    }
    engine.insert_batch("films", documents)?;

    let keyword = engine.query(
        "films",
        &QueryParams {
            term: Some("ronin".into()),
            filters: Some(parse_json(r#"{ "fields": { "year": { "gte": 1990 } } }"#)?),
            ..QueryParams::default()
        },
    )?;
    println!("{} {}", keyword.count, keyword.hits[0].id);

    let nearest = engine.query(
        "films",
        &QueryParams {
            vector: Some(VectorQuery {
                field: "embedding".into(),
                value: Some(vec![0.85, 0.2, 0.15]),
                ..VectorQuery::default()
            }),
            limit: Some(2),
            ..QueryParams::default()
        },
    )?;
    for hit in &nearest.hits {
        println!("{} {}", hit.id, hit.score.unwrap_or(0.0));
    }
    Ok(())
}
```

- [Serve Narsil over HTTP](https://narsil.sondelali.com/docs/http-server)

## Reproduce these numbers

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

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

- [Open the run on GitHub](https://github.com/assetcorp/narsil/tree/main/benchmarks/server/results/runs/20261119T135007Z)
- [Compare every engine in BENCHMARKS.md](https://github.com/assetcorp/narsil/blob/main/BENCHMARKS.md)
