Fast full-text search engine library written in Rust
open sourceMITself-hostablefree
Tantivy is a full-text search engine library in Rust, inspired by Apache Lucene: a crate for building a search engine into an application rather than a search server. It indexes text with configurable tokenizers (stemming for 17 Latin languages, third-party Chinese, Japanese and Korean tokenizers), scores with BM25, and supports phrase, range and faceted queries, a natural query language, JSON fields, fast fields and aggregations, with incremental and multithreaded indexing and a startup time under 10 ms. Distributed search is out of scope: Quickwit is built on it for that, and ParadeDB uses it in Postgres. Official Python bindings (tantivy-py) are published on PyPI.
Problems it solves
- add full-text search with BM25 ranking to my Rust application without running Elasticsearch
- embed a search index inside a command-line tool that starts instantly
- a Lucene-like search library for Rust
- phrase queries, facets and range filters over documents in my own app's index
- keyword search in a Python app without a separate search server
- build a custom search engine on top of a fast inverted index
- hybrid search needs a BM25 index next to my vector index
Features
- BM25 scoring
- configurable tokenizers, stemming for 17 Latin languages
- natural query language, phrase and range queries
- faceted search and aggregations (histogram, range buckets, stats)
- JSON fields and fast fields (doc values)
- incremental and multithreaded indexing
- compressed document store (LZ4, Zstd)
- mmap directory
- startup under 10 ms
- Python bindings (tantivy-py)
View 1 more
- tantivy-cli for indexing and search from the command line
Limitations
- Doesn't do distributed search and isn't a search server: it's a crate to build a search engine with (Quickwit is the distributed engine built on it)1
Capabilities
| Has official SDKs | plan not known |
|---|
Alternatives
The same job
These do what Tantivy does.
- Apache Solr The blazing-fast, open source, multi-modal search platform built on the full-text, vector, and geospatial search capabilities of Apache Lucene
- Apache Lucene A high-performance, full-featured text search engine library written in Java
- OramaJS Full-text, vector and hybrid search in your browser, server or edge network
- Meilisearch A lightning-fast search engine that fits effortlessly into your apps, websites, and workflow
- Typesense Cutting-edge, in-memory search engine for mere mortals. Knowledge of rocket science optional
- Elasticsearch Open source search, analytics, and AI platform
