Toast Driven

← Back to January 27, 2009

Using Solr Multicore

At work, Solr is the search backend of choice. In the process of upgrading to Solr 1.3.0, a cursory search for "solr multicore" yielded very little in the way of how to go about setting it up. Solr's multicore functionality is a way to run one Solr daemon that can serve multiple instances, meaning you run one Solr process but it can index/search completely different sites.

So without further ado, here's a quick way to get multicore support up and going for Solr 1.3.0:

  1. Fetch the latest release from the Solr website.
  2. Extract the tarball in a temporary location.
  3. Copy the "example" directory out to where you'd like to keep Solr and rename it "solr-1.3.0".
  4. Remove the following directories:
    • solr-1.3.0/example-DIH
    • solr-1.3.0/exampleAnalysis
    • solr-1.3.0/exampledocs
    • solr-1.3.0/work
  5. Copy "solr-1.3.0/multicore/solr.xml" to "solr-1.3.0/solr/solr.xml".
  6. Remove the "solr-1.3.0/multicore" directory.
  7. Within the "solr-1.3.0/solr/"directory, you should create a directory for each core (instance) you'd like to serve, then populate that directory with a "conf" directory. A quick route here is to copy the "solr-1.3.0/solr/conf" directory into your new directory and customize it to your liking.
  8. Alter "solr-1.3.0/solr/solr.xml" to include the newly added cores.
  9. Run Solr via "java -jar start.jar".

This was enough to get development machine up and running. We've done some performance tuning beyond this to take advantage of server hardware and large document sets, but those are better documented.

Toast Driven