-
Notifications
You must be signed in to change notification settings - Fork 11
Manual Solr Multicore setup for Specify Web Search Portal with Jetty
Contributed by Jon Lauters [email protected]:
Existing Solr setup is probably something like:
{path_to_webroot}/solr/{install_name}/collection1/
To use multicore, Solr needs to be restated with the following runtime param:
java -D solr.solr.home=multicore -jar start.jar
Some reorganization and reconfiguration within the /data/web/solr/
directory will need to happen next.
First edit the multicore solr.xml
in
{path_to_webroot}/solr/{install_name}/multicore/
Find this section in the code:
<cores adminPath="/admin/cores" host="${host:}" hostPort="${jetty.port:8983}" hostContext="${hostContext:solr}">
<core name="core0" instanceDir="core0" />
<core name="core1" instanceDir="core1" />
</cores>
You can leave these as is, or we can name the core directories something a little more meaningful. In the example for CU Museum we have Invert Paleo Collections and Florissant Fossilized Plant Collections
After editing this code block, it looks like:
<cores adminPath="/admin/cores" host="${host:}" hostPort="${jetty.port:8983}" hostContext="${hostContext:solr}">
<core name="invertpaleo" instanceDir="invertpaleo" />
<core name="flfo" instanceDir="flfo" />
</cores>
Then copy the supplied core directories to our named directories:
$ cp -R core0 invertpaleo
$ cp -R core1 flfo
If you have already configured solr for a single collection. You can copy those configurations into the core’s conf/
directory.
$ {path_to_webroot}/solr/multicore/{new_core_name}/conf/ cp {path_to_webroot}/solr/{install_name}/solr/collection1/conf/schema.xml
$ {path_to_webroot}/solr/multicore/{new_core_name}/conf/ cp {path_to_webroot}/solr/{install_name}/solr/collection1/conf/solrconfig.xml
There are a few text and xml files in the {path_to_webroot}/solr/{install_name}/solr/collection/conf/
directory that will need to also be copied into your new core/conf
directory. It may be easiest to copy this full conf directory into your core’s conf/
. At a minimum the following are required for solr to not throw errors:
currency.xml
elevate.xml
lang/
protwords.txt
stopwords.txt
synonyms.txt
In your new core, you will have to edit solrconfig.xml
to point the dataDir
to a separate directory.
<dataDir>${solr.data.dir:{path_to_webroot}/solr/{install_name}/collection2/data}</dataDir>
Lastly, You will have to change the Specify Web Search Portal configuration settings.
In your websearch/resources/config/
Open up settings.json
and change
From: ‘solrCore’ : ‘solr’
To: ‘solrCore’ : ‘solr/{name of solr core for this portal }’