Skip to content
waynegraham edited this page Jun 11, 2012 · 2 revisions

Multiple Cores

Using multiple cores in Solr allows you to have a single Solr instance with separate configurations and indexes, but with a unified administrative interface. If you are running more than one Solr index, you will want to use the mutlicore version of Solr. Fortunately, this is quite straight forward, but does require a slightly different setup than the default. For more in-depth documentation, see the Solr wiki page Core Admin.

Configuration

You define dynamic SolrCores in the solr.xml file in your solr.home directory. The file will need to be updated to look something like this:

<solr persistent="true" sharedLib="lib">
    <cores adminPath="/admin/cores">
        <core name="omeka" instanceDir="path/to/omeka/plugins/SolrSearch/solr-home" />
        <core name="other" instanceDir="path/to/another/solr-home" />
    </cores>
</solr>

Depending on your setup, you can start this in several ways:

Using the included Jetty engine:

java -Dsolr.solr.home=multicore -jar start.jar

Tomcat context file:

<Context docBase="/path/to/solr.war" debug="0" crossContext="true">
    <Environment name="solr/home" type="java.lang.String" value="/path/to/solr-home" override="true" />
</Context>

Omeka Integration

Simply update the named core (defaults to 'solr') in the Omeka SolrSearch plugin configuration interface. If you have a question about what cores are included, simply point your browser at the main Solr URL and look at the core names:

http://your.solr.url:8080/solr