tantivy README

The project's README from github.com/quickwit-oss/tantivy. As one markdown file: README.md.

Docs Build Status codecov OpenSSF Scorecard Join the chat at https://discord.gg/MT27AG5EVE License: MIT Crates.io

Tantivy, the fastest full-text search engine library written in Rust

Fast full-text search engine library written in Rust

If you are looking for an alternative to Elasticsearch or Apache Solr, check out Quickwit, our distributed search engine built on top of Tantivy.

Tantivy is closer to Apache Lucene than to Elasticsearch or Apache Solr in the sense it is not an off-the-shelf search engine server, but rather a crate that can be used to build such a search engine.

Tantivy is, in fact, strongly inspired by Lucene's design.

Benchmark

The following benchmark breaks down the performance for different types of queries/collections.

Your mileage WILL vary depending on the nature of queries and their load.

Details about the benchmark can be found at this repository.

Features

Non-features

Distributed search is out of the scope of Tantivy, but if you are looking for this feature, check out Quickwit.

Getting started

Tantivy works on stable Rust and supports Linux, macOS, and Windows.

How can I support this project?

There are many ways to support this project.

Contributing code

We use the GitHub Pull Request workflow: reference a GitHub ticket and/or include a comprehensive commit message when opening a PR. Feel free to update CHANGELOG.md with your contribution.

Tokenizer

When implementing a tokenizer for tantivy depend on the tantivy-tokenizer-api crate.

Clone and build locally

Tantivy compiles on stable Rust. To check out and run tests, you can simply run:

git clone https://github.com/quickwit-oss/tantivy.git
cd tantivy
cargo test

Companies Using Tantivy

Etsy   ParadeDB   Nuclia   Humanfirst.ai Element.io Nuclia   Humanfirst.ai    Element.io

FAQ

Can I use Tantivy in other languages?

You can also find other bindings on GitHub but they may be less maintained.

What are some examples of Tantivy use?

On average, how much faster is Tantivy compared to Lucene?

Does tantivy support incremental indexing?

How can I edit documents?

When will my documents be searchable during indexing?

tantivy (quickwit-oss/tantivy)

Searching Database…

16.2K ·GitHub
What is this?Tantivy is a full-text search engine library written in Rust, inspired by Apache Lucene, used to build search functionality directly into applications.
Is this a standalone search server like Elasticsearch, or something else?It is a library (crate), not an off-the-shelf server. If you need a ready-made distributed search server, the README points to Quickwit, which is built on top of Tantivy.
How do I add it to a Rust project?Add tantivy as a dependency via Cargo, the standard Rust crate manager, and use its IndexWriter/IndexReader API to build and query an index.
Do I need Rust toolchain and Cargo to use it?Yes, since it's distributed as a Rust crate, you need Rust and Cargo to build and depend on it.
Can I edit documents once they're indexed?No, data in Tantivy is immutable; to change a document you must delete it and reindex it, and changes only become visible after commit and reloading readers.
Can I use Tantivy from Python or Ruby instead of Rust?Yes, there are bindings: tantivy-py for Python and tantiny for Ruby, with other community bindings available on GitHub.
Does Tantivy support non-Latin language tokenization?Yes, besides built-in stemming for 17 Latin languages, there is third-party tokenizer support for Chinese (tantivy-jieba, cang-jie), Japanese (lindera, Vaporetto, tantivy-tokenizer-tiny-segmenter), and Korean (lindera + lindera-ko-dic-builder).
How does Tantivy's performance compare to Lucene?According to the project's search latency benchmark, Tantivy is approximately 2x faster than Lucene.
Does Tantivy support updating an index after initial creation?Yes, it supports incremental indexing, so new documents can be added to an existing index over time.
What kinds of projects have been built with Tantivy?Examples include seshat (a Matrix message database/indexer), tantiny (Ruby search), lnx (a typo-tolerant search engine with a REST API), and Bichon (a Rust email archiver with a web UI).
What are similar projects?bleve, php-fts, fsearch, sonic, xerj, flexsearch, meilisearch, hotdata-cli
Size
67.5 MB
Stars
16.2K
Age
10y
Commits · 90 Days