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
这是什么?Tantivy 是一个用 Rust 编写的全文搜索引擎库,灵感来自 Apache Lucene,用于直接在应用程序中构建搜索功能。
它是像 Elasticsearch 那样的独立搜索服务器,还是别的什么?它是一个库(crate),而不是现成的服务器。如果你需要现成的分布式搜索服务器,README 中提到的 Quickwit 就是基于 Tantivy 构建的。
怎样把它添加到 Rust 项目中?通过 Cargo(Rust 的标准包管理器)把 tantivy 添加为依赖,然后使用它的 IndexWriter/IndexReader 接口来构建和查询索引。
使用它需要安装 Rust 工具链和 Cargo 吗?需要。由于它以 Rust crate 的形式发布,你需要 Rust 和 Cargo 才能构建并将其作为依赖使用。
索引建好之后还能编辑文档吗?不能。Tantivy 中的数据是不可变的;要修改某个文档,你必须先删除再重新索引,而且只有在提交(commit)并重新加载读取器之后,更改才会生效。
能在 Python 或 Ruby 中使用 Tantivy,而不用 Rust 吗?可以,已有绑定:Python 有 tantivy-py,Ruby 有 tantiny,GitHub 上还有其他社区维护的绑定。
Tantivy 支持非拉丁语系的分词吗?支持。除了内置的 17 种拉丁语系词干提取外,还有第三方分词器支持中文(tantivy-jieba、cang-jie)、日文(lindera、Vaporetto、tantivy-tokenizer-tiny-segmenter)和韩文(lindera + lindera-ko-dic-builder)。
Tantivy 的性能与 Lucene 相比如何?根据项目的搜索延迟基准测试,Tantivy 大约比 Lucene 快 2 倍。
Tantivy 支持在首次创建索引之后继续更新吗?支持。它支持增量索引,因此可以随时间把新文档添加到已有索引中。
已经有哪些项目基于 Tantivy 构建?例子包括 seshat(Matrix 消息数据库/索引器)、tantiny(Ruby 搜索)、lnx(支持容错拼写、带 REST API 的搜索引擎)以及 Bichon(带 Web 界面的 Rust 邮件归档工具)。
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