Apache Lucene and Solr: search library and search server

Updated November 2026

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

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 start starts in SolrCloud mode by default; use --user-managed for the older standalone mode.
Configset and schema
A configset holds solrconfig.xml and the schema, which defines your fields and how each one is analyzed.
Your application, browser or script (HTTP / SolrJ) Solr: HTTP API, Admin UI, schema, security collections split into shards and replicas Lucene: analyzers, inverted index, segments one Lucene index per replica, on local disk ZooKeeper cluster state
Solr is the server layer; Lucene does the indexing and searching underneath. In SolrCloud, ZooKeeper keeps the cluster state.

Current versions

Lucene and Solr release lines, as of November 2026
ReleaseDateStatusJava
Lucene 10.6.0October 29, 2026Most recent Lucene release21 or later
Lucene 9.12.3September 27, 2025Latest in the 9.x series11 or later
Solr 10.1.0October 27, 2026Current major line (10.x), stableServer 21+, SolrJ client 17+
Solr 9.11.0October 4, 2026Last 9.x release; occasional critical fixes onlySee 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.

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

  1. 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.
  2. 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.
  3. Fix your scripts. Solr 10 changed the CLI: long options now use double dashes (--help, not -help), and bin/post and zkcli.sh are gone in favor of bin/solr post and bin/solr zk.
  4. Check Java. Solr 10 servers need Java 21.
  5. 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.
  6. 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.

Sources