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

# Narsil vs Qdrant

> The benchmark harness measured Narsil and Qdrant on the same vectors for recall, speed, and ingest. Every result is here, including Qdrant's wins.

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

## Headline result

On DBpedia 1M vector search with equal settings, Narsil answers 3.0 times as many searches a second as Qdrant.

Ratio: 3.0× (Qdrant's rate).

- Narsil Rust: 1,971
- Narsil TypeScript: 1,659
- Qdrant: 647

ANN recall@10 is 0.992 for Narsil TypeScript, 0.992 for Narsil Rust, and 0.993 for Qdrant.

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 Qdrant `1.20.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 Qdrant on GCP c3-standard-8, us-west4-a, each on the processor that its machine reports as Intel(R) Xeon(R) Platinum 8481C CPU @ 2.70GHz.

## What each engine is for

**Qdrant.** Qdrant is a vector database written in Rust. It stores vectors with a JSON payload for each point, filters on that payload during a search, and runs as a server that you can deploy yourself or use through Qdrant Cloud.

**Narsil.** Narsil searches vectors, full text, and both at once in one typed index. You can embed it in a TypeScript, Python, Go, or Rust process, where a vector search needs no network call, or you can deploy the same engine as a server.

## 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.

### Vector search

| Dataset | Engine | nDCG@10 | Recall@100 | ANN recall@10 | Ingest docs/s | p50 ms | p99 ms | Peak QPS |
| --- | --- | ---: | ---: | ---: | ---: | ---: | ---: | ---: |
| SciFact | Narsil TypeScript | 0.624 | 0.923 | 0.996 | 1,691 | 0.46 | 0.82 | 16,931 (16,925 to 16,999) |
| SciFact | Narsil Rust | 0.624 | 0.923 | 0.996 | 2,374 | 0.37 | 0.49 | 27,162 (27,054 to 27,221) |
| SciFact | Qdrant | 0.624 | 0.923 | 0.992 | 1,528 | 0.50 | 0.61 | 12,585 (12,514 to 12,588) |
| NFCorpus | Narsil TypeScript | 0.315 | 0.309 | 0.994 | 1,564 | 0.50 | 0.93 | 13,799 (13,794 to 14,027) |
| NFCorpus | Narsil Rust | 0.315 | 0.309 | 0.991 | 2,273 | 0.44 | 0.54 | 21,238 (21,167 to 21,265) |
| NFCorpus | Qdrant | 0.315 | 0.309 | 0.993 | 1,274 | 0.54 | 0.69 | 10,937 (10,928 to 10,957) |
| DBpedia 100K | Narsil TypeScript | n/a | n/a | 0.991 | 850 | 1.49 | 2.18 | 3,589 (3,567 to 3,592) |
| DBpedia 100K | Narsil Rust | n/a | n/a | 0.991 | 886 | 1.41 | 1.93 | 4,794 (4,660 to 5,195) |
| DBpedia 100K | Qdrant | n/a | n/a | 0.995 | 798 | 1.82 | 2.75 | 1,525 (1,517 to 1,536) |
| DBpedia 1M | Narsil TypeScript | n/a | n/a | 0.992 | 743 | 3.45 | 4.79 | 1,659 (1,631 to 1,663) |
| DBpedia 1M | Narsil Rust | n/a | n/a | 0.992 | 878 | 3.18 | 4.37 | 1,971 (1,849 to 2,005) |
| DBpedia 1M | Qdrant | n/a | n/a | 0.993 | 817 | 4.04 | 6.67 | 647 (643 to 661) |

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

| Dataset | Engine | nDCG@10 | Recall@100 | Ingest docs/s | p50 ms | p99 ms | Peak QPS |
| --- | --- | ---: | ---: | ---: | ---: | ---: | ---: |
| SciFact | Narsil TypeScript | 0.705 | 0.964 | 1,989 | 0.68 | 1.07 | 11,835 (11,798 to 11,838) |
| SciFact | Narsil Rust | 0.705 | 0.964 | 2,333 | 0.50 | 0.63 | 19,998 (19,936 to 20,005) |
| SciFact | Qdrant | 0.710 | 0.958 | 1,640 | 0.77 | 0.89 | 8,575 (8,521 to 8,575) |
| NFCorpus | Narsil TypeScript | 0.356 | 0.324 | 1,590 | 0.63 | 1.02 | 11,604 (11,578 to 11,613) |
| NFCorpus | Narsil Rust | 0.356 | 0.324 | 2,093 | 0.49 | 0.63 | 18,913 (18,884 to 18,916) |
| NFCorpus | Qdrant | 0.350 | 0.324 | 1,333 | 0.73 | 0.86 | 7,866 (7,854 to 7,870) |
| DBpedia 100K | Narsil TypeScript | n/a | n/a | 855 | 1.62 | 2.37 | 3,218 (3,172 to 3,228) |
| DBpedia 100K | Narsil Rust | n/a | n/a | 879 | 1.46 | 1.98 | 4,647 (4,423 to 4,736) |
| DBpedia 100K | Qdrant | n/a | n/a | 798 | 2.23 | 3.43 | 1,404 (1,389 to 1,410) |
| DBpedia 1M | Narsil TypeScript | n/a | n/a | 704 | 4.01 | 6.18 | 1,304 (1,280 to 1,310) |
| DBpedia 1M | Narsil Rust | n/a | n/a | 880 | 3.76 | 5.50 | 1,614 (1,596 to 1,650) |
| DBpedia 1M | Qdrant | n/a | n/a | 810 | 5.50 | 9.52 | 599 (592 to 599) |

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.

## Recommended production settings

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

| Dataset | Engine | nDCG@10 | Recall@100 | ANN recall@10 | Vector storage | Ingest docs/s | p50 ms | p99 ms | Peak QPS |
| --- | --- | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: |
| SciFact | Narsil TypeScript | 0.624 | 0.923 | 0.993 | OSQ 4-bit | 2,100 | 0.39 | 0.76 | 15,809 (15,756 to 15,840) |
| SciFact | Narsil Rust | 0.624 | 0.923 | 0.995 | OSQ 4-bit | 2,367 | 0.34 | 0.47 | 30,671 (30,602 to 30,696) |
| SciFact | Qdrant | 0.624 | 0.923 | 0.995 | TurboQuant 4-bit | 1,495 | 0.47 | 0.56 | 14,400 (14,381 to 14,497) |
| NFCorpus | Narsil TypeScript | 0.315 | 0.309 | 0.993 | OSQ 4-bit | 1,562 | 0.43 | 0.80 | 13,309 (13,273 to 13,336) |
| NFCorpus | Narsil Rust | 0.315 | 0.309 | 0.993 | OSQ 4-bit | 1,995 | 0.41 | 0.54 | 23,795 (23,768 to 23,836) |
| NFCorpus | Qdrant | 0.315 | 0.309 | 0.993 | TurboQuant 4-bit | 1,331 | 0.50 | 0.59 | 12,855 (12,847 to 12,877) |
| DBpedia 100K | Narsil TypeScript | n/a | n/a | 0.992 | OSQ 4-bit | 818 | 0.86 | 1.38 | 5,522 (5,462 to 5,536) |
| DBpedia 100K | Narsil Rust | n/a | n/a | 0.991 | OSQ 4-bit | 879 | 0.78 | 1.01 | 9,341 (9,285 to 9,465) |
| DBpedia 100K | Qdrant | n/a | n/a | 0.993 | TurboQuant 4-bit | 813 | 0.85 | 1.48 | 4,648 (4,600 to 4,666) |
| DBpedia 1M | Narsil TypeScript | n/a | n/a | 0.992 | OSQ 4-bit | 542 | 1.58 | 2.33 | 3,766 (3,586 to 3,931) |
| DBpedia 1M | Narsil Rust | n/a | n/a | 0.992 | OSQ 4-bit | 882 | 1.77 | 2.36 | 3,847 (3,716 to 3,879) |
| DBpedia 1M | Qdrant | n/a | n/a | 0.992 | TurboQuant 4-bit | 824 | 2.04 | 4.06 | 2,596 (2,566 to 2,636) |

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

| Dataset | Engine | nDCG@10 | Recall@100 | Vector storage | Ingest docs/s | p50 ms | p99 ms | Peak QPS |
| --- | --- | ---: | ---: | ---: | ---: | ---: | ---: | ---: |
| SciFact | Narsil TypeScript | 0.705 | 0.964 | OSQ 4-bit | 2,012 | 0.61 | 0.92 | 10,572 (10,571 to 10,709) |
| SciFact | Narsil Rust | 0.705 | 0.964 | OSQ 4-bit | 2,398 | 0.47 | 0.61 | 21,782 (21,769 to 21,888) |
| SciFact | Qdrant | 0.716 | 0.958 | TurboQuant 4-bit | 1,662 | 0.72 | 0.83 | 8,973 (8,956 to 8,974) |
| NFCorpus | Narsil TypeScript | 0.356 | 0.324 | OSQ 4-bit | 1,626 | 0.61 | 0.95 | 10,784 (10,711 to 10,926) |
| NFCorpus | Narsil Rust | 0.356 | 0.324 | OSQ 4-bit | 1,939 | 0.43 | 0.58 | 21,494 (21,487 to 21,504) |
| NFCorpus | Qdrant | 0.350 | 0.324 | TurboQuant 4-bit | 1,331 | 0.69 | 0.79 | 8,783 (8,782 to 8,784) |
| DBpedia 100K | Narsil TypeScript | n/a | n/a | OSQ 4-bit | 812 | 1.02 | 1.62 | 4,789 (4,749 to 4,795) |
| DBpedia 100K | Narsil Rust | n/a | n/a | OSQ 4-bit | 876 | 0.91 | 1.21 | 8,433 (8,425 to 8,540) |
| DBpedia 100K | Qdrant | n/a | n/a | TurboQuant 4-bit | 823 | 1.26 | 1.95 | 3,606 (3,512 to 3,616) |
| DBpedia 1M | Narsil TypeScript | n/a | n/a | OSQ 4-bit | 572 | 2.56 | 6.42 | 2,492 (2,471 to 2,508) |
| DBpedia 1M | Narsil Rust | n/a | n/a | OSQ 4-bit | 881 | 2.49 | 4.14 | 2,756 (2,752 to 2,761) |
| DBpedia 1M | Qdrant | n/a | n/a | TurboQuant 4-bit | 822 | 2.97 | 6.17 | 1,598 (1,575 to 1,625) |

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 ranks keyword matches with BM25 in the same index as your vectors, then fuses both rankings into one list for a hybrid search.
- 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's embedding adapters create the vectors when you insert a document and when you search. A companion package lets you use a local model, which needs no API key.

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

### nDCG@10

Narsil better in 4 of 16.

| Comparison | Narsil | Qdrant |
| --- | ---: | ---: |
| Hybrid, NFCorpus (equal, Narsil TypeScript) | 0.356 | 0.350 |
| Hybrid, NFCorpus (equal, Narsil Rust) | 0.356 | 0.350 |
| Hybrid, NFCorpus (recommended, Narsil TypeScript) | 0.356 | 0.350 |
| Hybrid, NFCorpus (recommended, Narsil Rust) | 0.356 | 0.350 |

### Peak queries a second

Narsil better in 32 of 32.

| Comparison | Narsil | Qdrant |
| --- | ---: | ---: |
| Vector, SciFact (equal, Narsil TypeScript) | 16,931 | 12,585 |
| Vector, SciFact (equal, Narsil Rust) | 27,162 | 12,585 |
| Vector, NFCorpus (equal, Narsil TypeScript) | 13,799 | 10,937 |
| Vector, NFCorpus (equal, Narsil Rust) | 21,238 | 10,937 |
| Vector, DBpedia 100K (equal, Narsil TypeScript) | 3,589 | 1,525 |
| Vector, DBpedia 100K (equal, Narsil Rust) | 4,794 | 1,525 |
| Vector, DBpedia 1M (equal, Narsil TypeScript) | 1,659 | 647 |
| Vector, DBpedia 1M (equal, Narsil Rust) | 1,971 | 647 |
| Hybrid, SciFact (equal, Narsil TypeScript) | 11,835 | 8,575 |
| Hybrid, SciFact (equal, Narsil Rust) | 19,998 | 8,575 |
| Hybrid, NFCorpus (equal, Narsil TypeScript) | 11,604 | 7,866 |
| Hybrid, NFCorpus (equal, Narsil Rust) | 18,913 | 7,866 |
| Hybrid, DBpedia 100K (equal, Narsil TypeScript) | 3,218 | 1,404 |
| Hybrid, DBpedia 100K (equal, Narsil Rust) | 4,647 | 1,404 |
| Hybrid, DBpedia 1M (equal, Narsil TypeScript) | 1,304 | 599 |
| Hybrid, DBpedia 1M (equal, Narsil Rust) | 1,614 | 599 |
| Vector, SciFact (recommended, Narsil TypeScript) | 15,809 | 14,400 |
| Vector, SciFact (recommended, Narsil Rust) | 30,671 | 14,400 |
| Vector, NFCorpus (recommended, Narsil TypeScript) | 13,309 | 12,855 |
| Vector, NFCorpus (recommended, Narsil Rust) | 23,795 | 12,855 |
| Vector, DBpedia 100K (recommended, Narsil TypeScript) | 5,522 | 4,648 |
| Vector, DBpedia 100K (recommended, Narsil Rust) | 9,341 | 4,648 |
| Vector, DBpedia 1M (recommended, Narsil TypeScript) | 3,766 | 2,596 |
| Vector, DBpedia 1M (recommended, Narsil Rust) | 3,847 | 2,596 |
| Hybrid, SciFact (recommended, Narsil TypeScript) | 10,572 | 8,973 |
| Hybrid, SciFact (recommended, Narsil Rust) | 21,782 | 8,973 |
| Hybrid, NFCorpus (recommended, Narsil TypeScript) | 10,784 | 8,783 |
| Hybrid, NFCorpus (recommended, Narsil Rust) | 21,494 | 8,783 |
| Hybrid, DBpedia 100K (recommended, Narsil TypeScript) | 4,789 | 3,606 |
| Hybrid, DBpedia 100K (recommended, Narsil Rust) | 8,433 | 3,606 |
| Hybrid, DBpedia 1M (recommended, Narsil TypeScript) | 2,492 | 1,598 |
| Hybrid, DBpedia 1M (recommended, Narsil Rust) | 2,756 | 1,598 |

### Median client latency, ms

Narsil better in 31 of 32.

| Comparison | Narsil | Qdrant |
| --- | ---: | ---: |
| Vector, SciFact (equal, Narsil TypeScript) | 0.46 | 0.50 |
| Vector, SciFact (equal, Narsil Rust) | 0.37 | 0.50 |
| Vector, NFCorpus (equal, Narsil TypeScript) | 0.50 | 0.54 |
| Vector, NFCorpus (equal, Narsil Rust) | 0.44 | 0.54 |
| Vector, DBpedia 100K (equal, Narsil TypeScript) | 1.49 | 1.82 |
| Vector, DBpedia 100K (equal, Narsil Rust) | 1.41 | 1.82 |
| Vector, DBpedia 1M (equal, Narsil TypeScript) | 3.45 | 4.04 |
| Vector, DBpedia 1M (equal, Narsil Rust) | 3.18 | 4.04 |
| Hybrid, SciFact (equal, Narsil TypeScript) | 0.68 | 0.77 |
| Hybrid, SciFact (equal, Narsil Rust) | 0.50 | 0.77 |
| Hybrid, NFCorpus (equal, Narsil TypeScript) | 0.63 | 0.73 |
| Hybrid, NFCorpus (equal, Narsil Rust) | 0.49 | 0.73 |
| Hybrid, DBpedia 100K (equal, Narsil TypeScript) | 1.62 | 2.23 |
| Hybrid, DBpedia 100K (equal, Narsil Rust) | 1.46 | 2.23 |
| Hybrid, DBpedia 1M (equal, Narsil TypeScript) | 4.01 | 5.50 |
| Hybrid, DBpedia 1M (equal, Narsil Rust) | 3.76 | 5.50 |
| Vector, SciFact (recommended, Narsil TypeScript) | 0.39 | 0.47 |
| Vector, SciFact (recommended, Narsil Rust) | 0.34 | 0.47 |
| Vector, NFCorpus (recommended, Narsil TypeScript) | 0.43 | 0.50 |
| Vector, NFCorpus (recommended, Narsil Rust) | 0.41 | 0.50 |
| Vector, DBpedia 100K (recommended, Narsil Rust) | 0.78 | 0.85 |
| Vector, DBpedia 1M (recommended, Narsil TypeScript) | 1.58 | 2.04 |
| Vector, DBpedia 1M (recommended, Narsil Rust) | 1.77 | 2.04 |
| Hybrid, SciFact (recommended, Narsil TypeScript) | 0.61 | 0.72 |
| Hybrid, SciFact (recommended, Narsil Rust) | 0.47 | 0.72 |
| Hybrid, NFCorpus (recommended, Narsil TypeScript) | 0.61 | 0.69 |
| Hybrid, NFCorpus (recommended, Narsil Rust) | 0.43 | 0.69 |
| Hybrid, DBpedia 100K (recommended, Narsil TypeScript) | 1.02 | 1.26 |
| Hybrid, DBpedia 100K (recommended, Narsil Rust) | 0.91 | 1.26 |
| Hybrid, DBpedia 1M (recommended, Narsil TypeScript) | 2.56 | 2.97 |
| Hybrid, DBpedia 1M (recommended, Narsil Rust) | 2.49 | 2.97 |

### Documents ingested a second

Narsil better in 27 of 32.

| Comparison | Narsil | Qdrant |
| --- | ---: | ---: |
| Vector, SciFact (equal, Narsil TypeScript) | 1,691 | 1,528 |
| Vector, SciFact (equal, Narsil Rust) | 2,374 | 1,528 |
| Vector, NFCorpus (equal, Narsil TypeScript) | 1,564 | 1,274 |
| Vector, NFCorpus (equal, Narsil Rust) | 2,273 | 1,274 |
| Vector, DBpedia 100K (equal, Narsil TypeScript) | 850 | 798 |
| Vector, DBpedia 100K (equal, Narsil Rust) | 886 | 798 |
| Vector, DBpedia 1M (equal, Narsil Rust) | 878 | 817 |
| Hybrid, SciFact (equal, Narsil TypeScript) | 1,989 | 1,640 |
| Hybrid, SciFact (equal, Narsil Rust) | 2,333 | 1,640 |
| Hybrid, NFCorpus (equal, Narsil TypeScript) | 1,590 | 1,333 |
| Hybrid, NFCorpus (equal, Narsil Rust) | 2,093 | 1,333 |
| Hybrid, DBpedia 100K (equal, Narsil TypeScript) | 855 | 798 |
| Hybrid, DBpedia 100K (equal, Narsil Rust) | 879 | 798 |
| Hybrid, DBpedia 1M (equal, Narsil Rust) | 880 | 810 |
| Vector, SciFact (recommended, Narsil TypeScript) | 2,100 | 1,495 |
| Vector, SciFact (recommended, Narsil Rust) | 2,367 | 1,495 |
| Vector, NFCorpus (recommended, Narsil TypeScript) | 1,562 | 1,331 |
| Vector, NFCorpus (recommended, Narsil Rust) | 1,995 | 1,331 |
| Vector, DBpedia 100K (recommended, Narsil TypeScript) | 818 | 813 |
| Vector, DBpedia 100K (recommended, Narsil Rust) | 879 | 813 |
| Vector, DBpedia 1M (recommended, Narsil Rust) | 882 | 824 |
| Hybrid, SciFact (recommended, Narsil TypeScript) | 2,012 | 1,662 |
| Hybrid, SciFact (recommended, Narsil Rust) | 2,398 | 1,662 |
| Hybrid, NFCorpus (recommended, Narsil TypeScript) | 1,626 | 1,331 |
| Hybrid, NFCorpus (recommended, Narsil Rust) | 1,939 | 1,331 |
| Hybrid, DBpedia 100K (recommended, Narsil Rust) | 876 | 823 |
| Hybrid, DBpedia 1M (recommended, Narsil Rust) | 881 | 822 |

## Where Qdrant is better

- Qdrant's developers built it for vector search first, so it offers sparse vectors, multivector points, and binary and product quantisation alongside scalar quantisation.
- Qdrant shards and replicates each collection across the nodes of a cluster.
- Qdrant Cloud operates Qdrant clusters for you.

Measurements that Qdrant won:

### nDCG@10

Qdrant better in 4 of 16.

| Comparison | Narsil | Qdrant |
| --- | ---: | ---: |
| Hybrid, SciFact (equal, Narsil TypeScript) | 0.705 | 0.710 |
| Hybrid, SciFact (equal, Narsil Rust) | 0.705 | 0.710 |
| Hybrid, SciFact (recommended, Narsil TypeScript) | 0.705 | 0.716 |
| Hybrid, SciFact (recommended, Narsil Rust) | 0.705 | 0.716 |

### Median client latency, ms

Qdrant better in 1 of 32.

| Comparison | Narsil | Qdrant |
| --- | ---: | ---: |
| Vector, DBpedia 100K (recommended, Narsil TypeScript) | 0.86 | 0.85 |

### Documents ingested a second

Qdrant better in 5 of 32.

| Comparison | Narsil | Qdrant |
| --- | ---: | ---: |
| Vector, DBpedia 1M (equal, Narsil TypeScript) | 743 | 817 |
| Hybrid, DBpedia 1M (equal, Narsil TypeScript) | 704 | 810 |
| Vector, DBpedia 1M (recommended, Narsil TypeScript) | 542 | 824 |
| Hybrid, DBpedia 100K (recommended, Narsil TypeScript) | 812 | 823 |
| Hybrid, DBpedia 1M (recommended, Narsil TypeScript) | 572 | 822 |

## 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 qdrant
```

- [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)
