I'm using Azure search in Sitecore 8.2 update 1 version, looking for configuration to set switch on rebuild index. Every time when we do rebuilding indexes, we are seeing downtime with empty results.

I have seen switch on rebuild indexes for Lucene/Solr but not for azure search in the Sitecore documentation. https://doc.sitecore.net/sitecore_experience_platform/setting_up_and_maintaining/search_and_indexing/configure_azure_search

Anyone tried on Azure search configuration to set switchonRebuild Index, Please share your thoughts.

2 Answers 2


Azure Search does not yet support (or simulate) this functionality.

Best you could do is to reconfigure your CM and build a new index name out, then update the configs on the CDs. Will likely need an AppPool recycle unless you do something tricky, so I hope you have load balancers.

It's a bit ugly at the moment, but getting better...

  • Yes Richard, I'm using Azure web app instances which have load balancing config. I have a new custom index as normal stuff. Looking forward some support from Sitecore as well on this. Commented May 14, 2017 at 23:54
  • @SivaSankar please mark as answer if you found this helpful so that it does not appear on the "unanswered" list forever. Cheers Commented May 15, 2017 at 11:17

This is now supported in Sitecore versions 8.2.7 and 9.0.2 and later.

From the link below:

A full index rebuild executes in a separate rebuild index. When the rebuild operation finishes, Sitecore switches the Search service to use the new rebuilt index as the primary search index. After this, Sitecore deletes the previous Search index.

You can control the Switch On Rebuild feature with the following index configuration settings:

<setting name="ContentSearch.Azure.SwitchOnRebuild" value="true"/> 

To avoid downtime of the Search functionality during an index rebuild, use this setting to specify whether the Azure Search provider uses the SwitchOnRebuild functionality. The default value is true.

<setting name="ContentSearch.Azure.SwitchOnRebuildCleanUpDelay" value="00:01:00"/> 

You can set a time buffer to prevent Sitecore deleting the old index before all of the roles have been switched over to work with the newly rebuilt index. The default value is 00:01:00 (1 minute). You can only use this when the SwitchOnRebuild feature is enabled.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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