Back to Projects
TechnologyActive

Narsil

Distributed search engine with full-text, vector, hybrid, and geospatial search.

searchopen-sourcetypescriptdistributed-systems

Narsil is an open-source distributed search engine. It auto-partitions large indexes across worker threads, serialises them into a cross-language binary format, and merges results into ranked answers. It runs on Node.js, Bun, Deno, and the browser.

Four search modes in one engine

BM25 scoring with field boosting, fuzzy matching via bounded Levenshtein distance, and exact phrase search. Three distributed scoring modes: Local (fastest), DFS (two-phase global term statistics), and Broadcast (pre-computed shared statistics).

Benchmark results

Tested against the Cranfield Collection (1,400 documents, 225 expert-scored queries), Narsil outperformed both Orama and MiniSearch on nDCG@10, precision@10, MAP, and MRR.

Zero-downtime resharding, cursor-based pagination without offset degradation, faceted search with aggregate value counts, match highlighting, results pinning, and a plugin system with lifecycle hooks. Ships with full language support for 28+ languages, including early support for several African languages.

Where this is going

Search is one of the most fundamental operations in computing, and the tools available today force you to choose between power and accessibility. Elasticsearch is powerful but operationally heavy. Lightweight libraries are easy to embed but collapse under production workloads. Narsil is built to be both: production-grade distributed search that you can embed in any runtime, in any language, without a separate cluster to manage.

The deeper ambition is language equity. The search infrastructure the world relies on was built around European languages, and billions of people are left with degraded results because their languages lack the stemmers, tokenisers, and stopword lists that English has had for decades. Narsil will ship first-class support for African, South Asian, and Southeast Asian languages, built with native speakers and computational linguists, not bolted on as an afterthought. The goal is a search engine where a query in Twi returns results as precise as a query in English.

More projects

All projects

Search

Search for blog posts, projects, and pages