Rebuilding the Search Index on Remote Servers with Sitecore 7

May132014

I made a rookie mistake with Sitecore 7. I didn’t properly define an indexing strategy before launching a new multi-server Sitecore instance.

I have spent a lot of time working with Sitecore 7 but have found myself overwhelmed by the myriad of indexing strategies available for our shiny new Sitecore websites. Finally, I was forced to dig deeper and examine the indexing strategies in more detail when a client was unable to properly rebuild the search index on their Content Delivery server.

In the past I have relied heavily on the OnPublishEndAsynchronous strategy which uses the publish:end and publish:end:remote events to incrementally update the search indexes on the Content Management (CM) and Content Delivery (CD) servers after publishing. This Sitecore indexing strategy is configured out of the box and is recommended for multi-server/multi-instance environments (Keep in mind the EventQueue must remain enabled). This is a great indexing strategy to do the heavy lifting for you because content authors don’t need to be aware of the intricacies of a search index since any changes are picked up and indexed on publish.

Unfortunately, I ran into a situation where the OnPublishEndAsynchronous strategy just wasn’t able to properly rebuild the index on the CD server when publishing. I had the client attempt a full republish on more than one occasion but the index wasn’t picking up the new content. At this point I realized that it was a mistake to rely exclusively on the OnPublishEndAsynchronous strategy since it’s inevitable that an index will eventually get out of sync and need to be manually rebuilt. The index can get out of sync for a number of reasons but I wasn’t able to properly diagnose the issue since I did not have access to the client’s internal network.

I was looking for an easy way to manually rebuild the search index on a remote server. This would allow me to keep things simple for the client (without the need for them to install any 3rd party tools or resort to using code to rebuild the index). I informed the client that using the built-in Indexing Manager available in the Control Panel does not rebuild remote indexes as would be expected. Unfortunately, I unknowingly assumed that the same was true when triggering a rebuild from the developer tab in the Sitecore ribbon.

It turns out that rebuilding from the Developer tool bar does actually rebuild remote indexes! This was a nice find and I didn’t really expect it to work.

I was a little confused but the reason for this is that the Indexing Manager in the Control Panel does not initiate a full re-index like the indexing options in the Developer tool bar. It is the full re-index that triggers the RemoteRebuild strategy and raises an event that will re-index remote servers that are configured with this strategy.

With this knowledge Sitecore administrators can now rebuild the search index on the CD server as needed from the Sitecore client on the CM server. Hopefully this will not need to be done on a regular basis but it’s good to know it’s available in a pinch.

This was done using Sitecore 7.1 (rev. 140130).

Skip to sharing

One response to “Rebuilding the Search Index on Remote Servers with Sitecore 7”

  1. Yeah this is a weird one because the Developer tab is hidden by default. If you right click on the ribbon then you will have the option to toggle tabs on or off including the Developer tab.