Solr Search: Apache Solr Multi-core Setup using Jetty

Setting up one Solr server with two or more sites takes some additional configuration. If this is not done, all of the data for each site goes into the same index and when searching on one site, results are returned from both sites. If that’s not the desired result (faceting won’t currently work correctly), then it is necessary to set up a separate Solr core for each site. Each core is a totally independent search index.

Alter in /solr/example/solr/solr.xml as follows

Setting up one Solr server with two or more sites takes some additional configuration. If this is not done, all of the data for each site goes into the same index and when searching on one site, results are returned from both sites. If that’s not the desired result (faceting won’t currently work correctly), then it is necessary to set up a separate Solr core for each site. Each core is a totally independent search index.
Alter in /solr/example/solr/solr.xml as follows


<?xml version=”1.0″ encoding=”UTF-8″ ?>
<solr persistent=”false”>
<cores adminPath=”/admin/cores”>
<core name=”site1″ instanceDir=”core1″ />
<core name=”site2″ instanceDir=”core2″ />
</cores>
</solr>


And create required core folders named core1 and core2 as specified in solr.xml, In each core folder create its own conf folder with its schema and solrconfig xml’s.
Run solr: java -jar start.jar in terminal
You have successfully created solr multiple instance. now you can go to http://localhost:8983/solr/ to get each site/core admin

And create required core folders named core1 and core2 as specified in solr.xml, In each core folder create its own conf folder with its schema and solrconfig xml’s.

Run solr: java -jar start.jar in terminal

You have successfully created solr multiple instance. now you can go to http://localhost:8983/solr/ to get each site/core admin

Comments