How to avoid Sitecore search downtime during index rebuilds

How to avoid Sitecore search downtime during index rebuilds

Header image of Sitecore search downtime blog
default avatar
Thought byRosen Petrov
March 02, 2019

Sharing our insights on refining Sitecore's search functionality to avoid downtime during index rebuilds.

The FFW team works with more than just Drupal and WordPress. We've built some award-winning Sitecore solutions as well, and in this Sitecore blog series, we'll be sharing our insights on refining Sitecore's search functionality to enhance the user experience.  

By default, while the index rebuilding takes place, all the Content Search API query functionalities are unavailable. This happens because everything that was stored in the index before is deleted on a rebuild and indexed again. In order to avoid downtime during index rebuilding, Sitecore utilizes a feature called core swapping.

Core swapping allows replacing a "primary" core with a "secondary" core while keeping the old "primary" core running in case you decide to roll-back. To enable the core swapping you should do the following:

  • Duplicate the core in Solr using the same name with some suffix like “_sec “
  • Change the type of the index in the configuration file
    • from Sitecore.ContentSearch.SolrProvider.SolrSearchIndex
    • to Sitecore.ContentSearch.SolrProvider.SwitchOnRebuildSolrSearchIndex
  • Add the parameter rebuildcore in your configuration file and point it to the secondary core for the index <param desc="rebuildcore">$(id)_sec</param>

Here is the official Sitecore documentation about how to configure core swapping on your index.

If you enjoyed this blog post, please don’t forget to check the Sitecore Search Series: Your Complete Guide to Performance Improvement blog series for more good tips! 

For help with a Sitecore site, let us know. We're here to assist! And if you have more Sitecore Search Performance tips, feel free to put them as comments below!

Topics:
Sitecore
development
search
sitecore search series

Read next:

Blog
Nouveau site web pour FFW

Come see the new FFW look and platform

Blog
Teaser image of Sitecore Search Performance blog

Sitecore Search Performance: Decreasing Sitecore's Search and Indexing Time

Blog
Teaser of Sitecore Search Series blog

Sitecore Search Series: Your Complete Guide to Performance Improvement

Blog
Teaser of Novozymes report blog

Novozymes named best digital annual report of 2018