Lucene vs Solr

Many people new to Lucene and Solr will ask the obvious question: When do I use Lucene and when do I use Solr?

The answer is simple: if you're asking yourself this question, in 99% of situations, what you want to use is Solr.

What is Solr?

Apache Solr is a HTTP wrapper around Lucene with all kinds of goodies.

It adds functionality like XML/HTTP and JSON APIs, hit highlighting, faceted search, caching, replication, a web administration interface etc

Where Lucene is a library and NOT an application, Solr is a web application (WAR) which can be deployed in any servlet container, e.g. Jetty, Tomcat, Resin, etc.

Is it well supported?

In a nutshell, yes! The Solr community is very vibrant and helpful.

Can Solr indexes be read by Lucene and vice-versa?

Since Solr uses Lucene under the hoods, they are one and the same thing.

There is technically no such thing as a Solr index, only a Lucene index created by a Solr instance.

When should I use Lucene then?

If there's the need to embed search functionality into your own application (like a desktop application for example), Lucene is the more appropriate choice.

For situations where you have very customized requirements requiring low-level access to the Lucene API classes, Solr would be more a hindrance than a help, since it is an extra layer of indirection.