Apache Lucene and Solr: search library and search server
Apache Lucene is a Java library that indexes text and searches it fast. Apache Solr is a ready-to-run search server built on Lucene: you send it documents and queries over HTTP, and it handles the rest. As of November 2026 the current releases are Lucene 10.6.0 and Solr 10.1.0.
What each project is
Lucene is a code library, not a program you start. The project describes it as a high-performance search engine library written entirely in Java. You add it to your own Java application and call its API to build an index and run queries. Lucene handles full-text search, ranking of results, faceting, highlighting, spell correction, query suggestions and nearest-neighbor search over vectors. The Lucene site also notes that it is the search core of Apache Solr, Elasticsearch and OpenSearch, so many search products you meet are Lucene underneath.
Solr wraps Lucene in a server. It adds an HTTP API, an Admin UI in the browser, configuration files for your data model (the schema), and clustering. Solr was once a sub-project of Lucene; it is now a separate Apache top-level project with its own site at solr.apache.org.
A simple rule of thumb: if you are writing a Java program and want search inside it, use Lucene. If you want a search service that any language can talk to over HTTP, use Solr.
Typical uses
- Site and product search. A shop indexes its catalog and shows results with filters such as brand, price range and color. Those filter counts are called facets.
- Document search. Intranets, archives and legal or library collections index large amounts of text, often extracted from PDFs and office files.
- Vector and hybrid search. Both projects support dense vectors, so you can store embeddings from a machine-learning model and find "similar" items. Solr 10.1 adds a handler for hybrid search that merges keyword and vector results with reciprocal rank fusion.
- Geospatial search. "Stores within 10 km of this point" type queries.
- Analytics over search results. Solr offers statistics, aggregations and streaming expressions on top of the index.
How it works
At the heart of Lucene is an inverted index: a list of every word (term) and the documents that contain it, much like the index at the back of a book. When you add a document, an analyzer breaks the text into terms. For example, it might lowercase "Running Shoes", split it into "running" and "shoes", and reduce "running" to "run". Queries pass through the same analysis, so a search for "run shoe" still finds the document. Lucene writes the index in immutable chunks called segments and merges them in the background.
Solr adds layers on top:
- Core and collection
- A core is one Lucene index plus its configuration. In a cluster, a collection is a logical index spread over many cores.
- Shards and replicas
- A large collection is split into shards; each shard has one or more replicas (copies) on different machines for speed and failover.
- SolrCloud and ZooKeeper
- SolrCloud is Solr's cluster mode. Apache ZooKeeper stores the cluster state and shared configuration. Starting with Solr 10,
bin/solr startstarts in SolrCloud mode by default; use--user-managedfor the older standalone mode. - Configset and schema
- A configset holds
solrconfig.xmland the schema, which defines your fields and how each one is analyzed.
Current versions
| Release | Date | Status | Java |
|---|---|---|---|
| Lucene 10.6.0 | October 29, 2026 | Most recent Lucene release | 21 or later |
| Lucene 9.12.3 | September 27, 2025 | Latest in the 9.x series | 11 or later |
| Solr 10.1.0 | October 27, 2026 | Current major line (10.x), stable | Server 21+, SolrJ client 17+ |
| Solr 9.11.0 | October 4, 2026 | Last 9.x release; occasional critical fixes only | See 9.x docs |
| Solr before 9.11 | – | End of life, no further updates | – |
Solr bundles a specific Lucene version, which is not always the newest one. Solr 10.1.0 is built on Lucene 10.4. Neither project schedules releases in advance; they ship when enough changes have built up. Check the download pages for the current state.
Try Solr in five minutes
With Docker
The Solr Reference Guide's Docker chapter uses the solr image. This starts Solr, creates a core called gettingstarted, and keeps the data in a local folder:
docker run -d -v "$PWD/solrdata:/var/solr" -p 8983:8983 --name my_solr solr solr-precreate gettingstarted
docker exec -it my_solr solr post -c gettingstarted example/exampledocs/manufacturers.xml
Open http://localhost:8983/ for the Admin UI. Pin a tag such as solr:10.1.0 in real deployments instead of relying on latest.
From the release archive
You need Java 21 or later (java -version shows yours). Download, verify and start:
curl -LO https://dlcdn.apache.org/solr/solr/10.1.0/solr-10.1.0.tgz
curl -LO https://downloads.apache.org/solr/solr/10.1.0/solr-10.1.0.tgz.sha512
sha512sum -c solr-10.1.0.tgz.sha512
tar xzf solr-10.1.0.tgz
cd solr-10.1.0
bin/solr start
bin/solr create -c mycollection
bin/solr post -c mycollection example/exampledocs/*
curl "http://localhost:8983/solr/mycollection/select?q=*:*"
bin/solr stop --all
The checksum line should print solr-10.1.0.tgz: OK. The download page also links PGP signatures and the project's KEYS file if you want to verify the signature as well. For a guided tour with sample data, the Reference Guide tutorial starts a two-node example cluster with bin/solr start -e cloud.
Lucene in a Java project
Lucene is published to Maven Central. In Maven, add the core library (plus other modules such as analyzers or query parsers as you need them):
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-core</artifactId>
<version>10.6.0</version>
</dependency>
Security notes
Never put Solr on the open internet. The Solr documentation says no Solr API, including the Admin UI, is designed to be exposed to untrusted parties, and that Solr should always sit behind a firewall.
- By default Solr listens only on
127.0.0.1. If other machines must reach it, setSOLR_HOST_BINDinsolr.in.shto a specific internal address rather than0.0.0.0, and firewall port 8983. - Limit clients further with
SOLR_IP_ALLOWLISTandSOLR_IP_DENYLISTin the same file. - Turn on authentication. In SolrCloud mode,
bin/solr auth enable --credentials admin:LongRandomPasswordsets up Basic Authentication with a templatesecurity.json. Add--block-unknown trueif even health checks should need a login. - Use TLS between clients and Solr and between nodes, and protect ZooKeeper with ACLs.
- If you use the JWT plugin on Solr 9.0–9.10.1 or 10.0.0, set
"blockUnknown": trueexplicitly. The documented default was true, but the code default was false until 9.11 and 10.1 (advisory of May 19, 2026). - Recent advisories also covered the RuleBasedAuthorizationPlugin (CVE-2026-22022, fixed in 9.10.1) and core-creation file checks (CVE-2026-22444). Read the Solr security page for details and new items.
If you put Apache httpd in front of Solr as a reverse proxy, keep it on the internal network and add authentication there too. From Solr 10.1 the server and its tools use the v2 API at /api, so the proxy must allow that path.
The Solr team asks that scanner reports about third-party library CVEs go to the users mailing list, not the private security address. They publish a page of dependency CVEs already judged not exploitable in Solr.
Upgrading
- Read the upgrade notes. The Reference Guide has a "Major Changes in Solr 10" page. Review every version between yours and the target, including minor releases.
- Plan for one-way upgrades. Since 9.10, a SolrCloud node refuses to start if its major.minor version is lower than the highest version found elsewhere in the cluster. This supports rolling upgrades but blocks rolling downgrades across a major version, so take a backup before the first node moves to 10.x.
- Fix your scripts. Solr 10 changed the CLI: long options now use double dashes (
--help, not-help), andbin/postandzkcli.share gone in favor ofbin/solr postandbin/solr zk. - Check Java. Solr 10 servers need Java 21.
- Watch the special cases. The service installer now writes a systemd unit instead of an init.d script, so remove any old init.d script yourself. Solr 10.1 removes PKI authentication v1 between nodes. Users of the GPU (cuVS) vector module are told to stay on 10.0.x until a later 10.x release.
- Test on a copy. Restore a backup into a test cluster, upgrade it, run your real queries, then upgrade production node by node.
Lucene users upgrading between major versions should read the migration notes and change log for each release, linked from the Lucene download page.
Project links
- Lucene: lucene.apache.org (downloads, system requirements, news)
- Solr: solr.apache.org (downloads, Reference Guide, security page, mailing lists)
- License: both projects are released under the Apache License 2.0.
Sources
- Welcome to Apache Lucene, Apache Lucene project
- Apache Lucene Core, Apache Lucene project
- Lucene Downloads, Apache Lucene project
- Lucene Core News, Apache Lucene project
- Lucene 10.6.0 System Requirements, Apache Lucene project
- Lucene 9.12.3 System Requirements, Apache Lucene project
- Welcome to Apache Solr, Apache Solr project
- Solr Downloads, Apache Solr project
- Solr News, Apache Solr project
- Solr Security, Apache Solr project
- System Requirements, Solr Reference Guide
- Exercise 1: Index Techproducts Data, Solr Reference Guide
- Solr in Docker, Solr Reference Guide
- Solr Control Script Reference, Solr Reference Guide
- Securing Solr, Solr Reference Guide
- Major Changes in Solr 10, Solr Reference Guide