Narsil documentation
Narsil is an open source distributed search engine for TypeScript with full-text, vector, hybrid, and geosearch. It partitions large indexes across workers and merges results into a single ranked answer.
Getting started
1 guide
Core concepts
4 guides
Indexes and documents9 min readDefine typed schemas, manage indexes, and insert, read, update, and remove documents one at a time or in batches.Full-text search11 min readRank documents with BM25, tune fuzzy matching and match thresholds, boost fields, and highlight matches.Filters, facets, and pagination23 min readNarrow results with typed filters, build filter interfaces with facets, sort and group hits, and paginate at any depth.Language support5 min readTokenise, stem, and filter stop words in more than thirty languages, including eight African languages, through per-language entry points.
Search modes
4 guides
Vector search5 min readStore embeddings in vector fields, search by similarity with automatic HNSW promotion, and keep the graph healthy over time.Hybrid search6 min readRun keyword and vector retrieval in one query and fuse the rankings with reciprocal rank fusion or a weighted blend.Geosearch5 min readIndex coordinates as geopoints and filter by radius or polygon alongside a search term and every other query feature.Embedding adapters6 min readTurn text into vectors automatically on insert and at query time, with OpenAI-compatible APIs, local models, or your own adapter.
Operations
3 guides
Persistence and durability5 min readPersist partitions through pluggable adapters, close the crash window with a write-ahead log, and move whole indexes as portable snapshots.Partitions and workers8 min readShard an index across partitions, reshape it online, move search onto worker threads, and coordinate instances that share storage.HTTP server5 min readServe any Narsil engine over REST with health probes, batch imports, snapshots, and admin endpoints, secured by your own request hook.