This post will focus on showing you a way to build sitecore SOLR Indexes into a single core, Before diving deep I would like to explain what is a SOLR Core
SOLR Core is a running instance of a Lucene index along with all the SOLR configuration required to use it. A single SOLR application can contain 0 or more cores which are run largely in isolation but can communicate with each other if necessary via the Core Container.
By default Sitecore instances ship with 14 different indexes such as “sitecore_master_index…” and you have the option to either use SOLR or Lucene for these indexes, If you plan to use SOLR you have on the 2 options below
- Create 14 different cores in your SOLR instance to accommodate all the default 14 sitecore indexes
- Create 1 core for all the 14 different indexes
Being a developer and for my developer instance option 2 sounds better and quicker, So lets get down to business and see how to make all the sitecore default indexes build on a single core
As you can see in the below patch file which I have created to specify the name of the core in solr where the index needs to build.
The below is a sample include file which will index all of the sitecore_suggested_test_index data into this core “ClientName_Solr_Core”, You can repeat the same process of changing the name of the other sitecore indexes in a same way by changing the name of the core parameter.
<?xml version="1.0" encoding="utf-8"?> <!-- Purpose: This include file defines the indexes used by the content testing feature of Sitecore when using the SOLR content search provider. --> <configuration xmlns:patch="http://www.sitecore.net/xmlconfig/"> <sitecore> <contentSearch> <configuration type="Sitecore.ContentSearch.ContentSearchConfiguration, Sitecore.ContentSearch"> <indexes hint="list:AddIndex"> <index id="sitecore_suggested_test_index" type="Sitecore.ContentSearch.SolrProvider.SolrSearchIndex, Sitecore.ContentSearch.SolrProvider"> <param desc="core">ClientName_Solr_Core</param> </index> </indexes> </configuration> </contentSearch> </sitecore> </configuration>
The below line does the magic.
I have also blogged about Install multiple instances of SOLR for Sitecore on a single server which can be used as an different option.
If you have further questions, comment or tweet me at @sjain_hi