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 documents13 min readDefine typed schemas, manage indexes, and insert, read, update, and remove documents one at a time or in batches.Full-text search13 min readRank documents with BM25, tune fuzzy matching and match thresholds, boost fields, and highlight matches.Filters, facets, and pagination26 min readNarrow results with typed filters, build filter interfaces with facets, sort and group hits, and paginate at any depth.Language support14 min readTokenise, stem, and filter stop words in 107 languages through per-language entry points, and rebuild an index when a language module changes.
Search modes
4 guides
Vector search6 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.Geosearch6 min readIndex coordinates as geopoints and filter by radius or polygon alongside a search term and every other query feature.Embedding adapters7 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 durability10 min readPersist indexes through pluggable adapters, close the crash window with a write-ahead log, and move whole indexes as portable snapshots.Partitions and workers24 min readShard an index across partitions, reshape it online, move search onto worker threads, and coordinate instances that share storage.HTTP server6 min readServe any Narsil engine over REST with health probes, batch imports, snapshots, and admin endpoints, secured by your own request hook.