2

I have setup the SOLR with switch on rebuild configuration. But after setting it up I am facing a weird issue like my SOLR web index core is pointing to different SOLR index directory.

Let me explain, When I check the sitecore_web_index from the SOLR panel then I can see in the Instance section that my Sitecore secondary web index (sitecore_web_index_sec) is pointing to the main Sitecore web index (sitecore_web_index) and main Sitecore web index is pointing to the Sitecore secondary web index.

For example, you can see in the screenshot below that when I check secondary web index (red box) then it is pointing to the Sitecore main index directory data (green box).

enter image description here

This is vice versa (see screenshot below)

enter image description here

I checked the core.properties file for both web index directory. For the main Sitecore index it is as below:

#Written by CorePropertiesLocator
#Mon Apr 26 08:48:41 UTC 2021
config=solrconfig.xml
name=sitecore_web_index
schema=schema.xml
dataDir=data

and, for the Sitecore secondary web index it is as:

#Written by CorePropertiesLocator
#Mon Apr 26 08:48:41 UTC 2021
config=solrconfig.xml
name=sitecore_web_index_sec
schema=schema.xml
dataDir=data

Do you have any idea why is it happening?

2
  • 1
    Ages ago I wrote a blog post about SwitchOnRebuildSolrSearchIndex Solr provider for Sitecore skillcore.net/sitecore/… . Mechanism is simple - first it rebuilds secondary index and then it just switches cores - the rebuilt core will become new primary core, and the old primary core will become secondary core now. May 20 at 12:38
  • Now understood about it. Thanks @MarekMusielak May 20 at 13:06
3

This is how SwitchOnRebuildSolrSearchIndex solr works , this is not a bug.

Your website uses indexes from the primary core. Each time you initiate a full index rebuild, Sitecore does this in the secondary core. The secondary core then becomes the primary one after the rebuild.

You can read more about it in @Marek blog - https://www.skillcore.net/sitecore/using-switchonrebuildsolrsearchindex-solr-provider-for-sitecore and Sitecore article - https://doc.sitecore.com/developers/90/platform-administration-and-architecture/en/switch-solr-indexes.html

So that means your website will always use the primary core for results, it will switch these after the index is completed.

1
  • Oh! I this means everything is working fine. I thought I mess up somewhere with the configs. May 20 at 13:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.