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:
- Fetch the latest release from the Solr website.
- Extract the tarball in a temporary location.
- Copy the "example" directory out to where you'd like to keep Solr and rename it "solr-1.3.0".
-
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
- Copy "solr-1.3.0/multicore/solr.xml" to "solr-1.3.0/solr/solr.xml".
- Remove the "solr-1.3.0/multicore" directory.
- 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.
- Alter "solr-1.3.0/solr/solr.xml" to include the newly added cores.
- 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.