Tantivy

active

by Quickwit (Datadog) and contributors · since 2016

Lucene-inspired full-text search library in Rust, the engine under Quickwit and ParadeDB.

search engineembedded libraryopen source (permissive)mature

Overview

Tantivy is a full-text search engine library written in Rust and modeled on Lucene's architecture: segment-based inverted indexes, BM25 scoring, phrase and fuzzy queries, faceting, columnar 'fast fields' for aggregations and JSON fields. It starts quickly, uses memory efficiently and often outperforms Lucene in benchmarks. It is maintained by the Quickwit team (part of Datadog since 2025) and embedded by Quickwit, ParadeDB's pg_search and many Rust applications, with Python bindings via tantivy-py. It is a library: you bring the server, replication and distribution.

Strengths & trade-offs

Strengths

  • +Fast indexing and BM25 queries with low startup time
  • +Columnar fast fields for aggregations and sorting
  • +Rich query types: phrase, fuzzy, regex, range, faceting
  • +Memory-safe Rust and permissive MIT licence
  • +Proven inside Quickwit and ParadeDB

Trade-offs

  • −Library only: no server, replication or clustering
  • −No native vector search
  • −Pre-1.0 API changes between releases
  • −Smaller analyzer ecosystem than Lucene

Great for

  • +Embedding full-text search in Rust applications
  • +Building custom search services
  • +Search inside other databases (e.g., Postgres extensions)

Think twice for

  • −Teams wanting a ready-made search server
  • −Vector or semantic search
  • −Non-Rust stacks beyond Python

Capabilities

Native or official first-party support · 5 of 25 tracked

✓Full-text search
✓JSON
✓Columnar storage
✓Durable persistence
✓Compression
–Transactions
–Joins
–Secondary indexes
–Vector search
–Geospatial
–Change data capture
–Triggers
–Stored procedures
–Materialized views
–TTL / expiry
–Pub/Sub
–In-memory
–Encryption at rest
–Role-based access
–Time travel
–Branching
–Online schema changes
–Streaming ingest
–Offline sync
–Runs in WebAssembly

Scale & consistency

Comfortable data size
Medium · ≤ 10 TB
Horizontal scaling
Manual
Multi-region
No
Transactions
Limited ACID
Consistency
Strong
Schema
Strict
Architecture
Embedded
Query languages
Tantivy query parser (Lucene-like), Rust API

Single-index library; Quickwit and others build distribution on top.

Deployment

Self-hosted Vendor-managed cloud Serverless Embedded Edge Kubernetes operator

Ecosystem

apis & protocolsRust, Python (tantivy-py)
client languagesRust, Python
used byParadeDB, Quickwit

Alternatives to Tantivy

Compare all→
Apache LuceneSearch Engine38.6

The Java search library at the heart of Elasticsearch, OpenSearch and Solr, now with HNSW vectors.

tantivy vs apache-lucene →
BleveSearch Engine12.2

Pure-Go full-text, geo and vector indexing library from Couchbase.

tantivy vs bleve →
QuickwitSearch Engine11.9

Cloud-native search engine on object storage for logs and traces, built on Tantivy.

tantivy vs quickwit →
ParadeDBSearch Engine25.1

Elasticsearch-quality BM25 search and fast aggregations inside Postgres via the pg_search extension.

tantivy vs paradedb →
SonicSearch Engine8.3

Tiny schema-less Rust search backend that returns object IDs, running in a few MB of RAM.

tantivy vs sonic →
USearchVector23.1

Single-header C++ HNSW library with SIMD distance kernels and bindings for a dozen languages.

tantivy vs usearch →

Tantivy FAQ

What is Tantivy?

Tantivy is a search engine database by Quickwit (Datadog) and contributors, first released in 2016. Tantivy is a full-text search engine library written in Rust and modeled on Lucene's architecture: segment-based inverted indexes, BM25 scoring, phrase and fuzzy queries, faceting, columnar 'fast fields' for aggregations and JSON fields. It starts quickly, uses memory efficiently and often outperforms Lucene in benchmarks. It is maintained by the Quickwit team (part of Datadog since 2025) and embedded by Quickwit, ParadeDB's pg_search and many Rust applications, with Python bindings via tantivy-py. It is a library: you bring the server, replication and distribution.

Is Tantivy open source?

Yes. Tantivy is open source. License: MIT License.

Does Tantivy support ACID transactions?

Partly. Tantivy offers limited ACID guarantees (for example, single-record or single-partition transactions), with strong consistency.

Does Tantivy scale horizontally?

Tantivy has no built-in sharding; scaling out means partitioning data in your application. It is comfortable at medium scale (≤ 10 TB).

How can I run Tantivy?

You can self-host it and embed it in your application.

What is Tantivy best for?

Tantivy is a strong fit for embedding full-text search in Rust applications; building custom search services; and search inside other databases (e.g., Postgres extensions). Think twice for teams wanting a ready-made search server.

What are the best alternatives to Tantivy?

Common alternatives to Tantivy include Apache Lucene, Bleve, Quickwit, ParadeDB and Sonic. The right choice depends on your workload, scale and hosting; WhichDB's smart match ranks them against your requirements.

How popular is Tantivy?

Tantivy ranks #135 of 844 databases on the WhichDB Score (22.6/100), and #12 among search engine databases. The score combines public adoption signals such as package downloads, GitHub activity, job posts and developer discussion.