We noticed that our CD environment gave different results from the index compared to the CM environment. We did some more checks and found that the index on CD was also not updating anymore. It did work before. We also noticed it's not all the indexes that have this issue, only our SXA web index.

We did have a deploy but nothing changed to the index configuration - which is rather default actually.

We had quite some issues with indexes before, but not this. We also can't reproduce it on other environments.

After rebuilding the affected index(es), the issue was fixed. But I would like to know what is happening as this might occur again.

1 Answer 1


I found out that this behavior is related to the introduction of SwitchOnRebuild for Azure Search in Sitecore 9.0.2

As from that version, Sitecore has this feature, and it is turned on by default. Which is nice of course. To verify, check the indexes on your Azure Search app and you will see index names with _secondary after rebuilds.

To know which actual index to use, Sitecore keeps data in the Properties table of the Core database. After an index is rebuild, the apps change their value and switch indexes.

But.. what if an app is not started? Or, like in our case, your staging slot.. In that case the app/slot is not aware of the index switch and will start using old values that might be wrong.

So in my case I did perform a rebuild. Deployed to my staging slot (which was stopped), swapped, and .. had the issue. The (new) CD environment was not aware of the index switch and was looking at the "other" version for all indexes that were rebuild (and not for the others).

This issue is fixed in Sitecore 9.1 (is mentioned in the release notes with reference number 229625).

  • Hi @Gatogordo, I meet this issue in my env. I showed that is the same between CLOUD_REBUILD_INDEX_NAME and CLOUD_REBUILD_INDEX_NAME on core db. How can i fix that ? Commented Apr 5, 2019 at 12:45
  • 1
    Contact Sitecore Support and ask them for the patch.
    – Gatogordo
    Commented Apr 5, 2019 at 12:58
  • Thanks @Gatogordo I am thinking about disable SwitchOnRebuild config. is it work ? Commented Apr 5, 2019 at 15:55
  • 1
    Didn't test but that should work. Just don't disable the file but try to patch it instead.
    – Gatogordo
    Commented Apr 5, 2019 at 15:57

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.