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!

sitecore search series

Fill out the form to learn how FFW can support your needs.

Read next:

Sitecore Where Filter Blog Header

The final blog in the Sitecore Search series

Turquoise Sitecore Search logo

Getting all the search result data from the index vs Querying the Sitecore database

Orange search and code art on a teal background

4 tips to make your Sitecore search code run up to 5x faster.

Sitecore Experience Analytics Teaser Image

Sitecore Experience Analytics provides dashboards and reports for marketers and marketing analysts to identify patterns and trends in experience data. Here's how to get started using them.