vs

Apache Lucene vs Xapian

Apache Lucene: The Java search library at the heart of Elasticsearch, OpenSearch and Solr, now with HNSW vectors. Xapian: Mature C++ probabilistic full-text search library with bindings for a dozen languages.

key differences

  • Licensing: Apache Lucene is open source (permissive) (Apache License 2.0); Xapian is open source (copyleft) (GNU GPL v2 or later).
  • Apache Lucene is built for larger datasets (≤ 1 PB) than Xapian (≤ 10 TB).
  • Only Apache Lucene has vector search, columnar storage.
  • Only Xapian has transactions.

choose apache-lucene for

  • +Embedding search in JVM applications
  • +Building custom search servers
  • +Desktop and IDE search features
  • +Research on retrieval algorithms

best at · Search, Vector search, Embedded

choose xapian for

  • +Search inside desktop and server applications
  • +Indexing documentation, mail archives or websites with Omega
  • +Search in Python, Perl or PHP apps without running a search server

best at · Search, Embedded

overview
Primary model
Search Engine
Search Engine
Also supports
Vector, Spatial
–
Type
Embedded library
Embedded library
Status
Active
Active
Developer
Apache Software Foundation
Xapian project (Olly Betts and contributors)
First release
1999
2002
Latest version
10.5.2 (Oct 4, 2026)
2.1.0 (Aug 13, 2026)
License
Open source (permissive)Apache License 2.0
Open source (copyleft)GNU GPL v2 or later
Free tier
✓
✓
popularity
WhichDB Score
38.6
18.0
Rank
#50
#185
GitHub stars
3.6K
877
Stack Overflow questions
11.9K
105
scale & guarantees
Comfortable data size
Large (≤ 1 PB)
Medium (≤ 10 TB)
Horizontal scaling
Manual
Manual
Multi-region
None
None
ACID
Limited
Limited
Consistency
Strong
Strong
Schema
Flexible
Schemaless
Architecture
Embedded
Embedded, Client server
deployment
Self-hosted
✓
✓
Vendor-managed cloud
—
—
Serverless
—
—
Embedded
✓
✓
Edge
—
—
Clouds
–
–
capabilities
Transactions
—
✓
Joins
—
—
Secondary indexes
—
—
Full-text search
✓
✓
Vector search
✓
—
Geospatial
✓
✓
JSON
—
—
Change data capture
—
—
Triggers
—
—
Stored procedures
—
—
Materialized views
—
—
TTL / expiry
—
—
Pub/Sub
—
—
Columnar storage
✓
—
In-memory
—
—
Durable persistence
✓
✓
Compression
✓
✓
Encryption at rest
—
—
Role-based access
—
—
Time travel
—
—
Branching
—
—
Online schema changes
—
—
Streaming ingest
—
—
Offline sync
—
—
Runs in WebAssembly
—
—
interfaces
Query languages
Lucene query syntax, Java API
Xapian query parser syntax, Query API
Client languages
Java, Kotlin, Scala
C++, Python, Perl, PHP, Java, Ruby, C#, Tcl
Best for
Search, Vector search, Embedded, Geo
Search, Embedded

Apache Lucene vs Xapian: FAQ

What is the difference between Apache Lucene and Xapian?

Apache Lucene: The Java search library at the heart of Elasticsearch, OpenSearch and Solr, now with HNSW vectors. Xapian: Mature C++ probabilistic full-text search library with bindings for a dozen languages. Licensing: Apache Lucene is open source (permissive) (Apache License 2.0); Xapian is open source (copyleft) (GNU GPL v2 or later). Apache Lucene is built for larger datasets (≤ 1 PB) than Xapian (≤ 10 TB). Only Apache Lucene has vector search, columnar storage.

When should I choose Apache Lucene over Xapian?

Choose Apache Lucene for embedding search in JVM applications; building custom search servers; and desktop and IDE search features. Choose Xapian for search inside desktop and server applications; indexing documentation, mail archives or websites with Omega; and search in Python, Perl or PHP apps without running a search server.

Is Apache Lucene or Xapian more popular?

Apache Lucene ranks #50 on the WhichDB Score (38.6/100) and Xapian ranks #185 (18.0/100). Popularity is not fit: check the requirements that matter for your project.

Are Apache Lucene and Xapian open source?

Yes. Apache Lucene is open source. License: Apache License 2.0. Yes. Xapian is open source. License: GNU GPL v2 or later.