This blog post contains information about index update strategies in version 7 of the Sitecore ASP.NET web Content Management System (CMS). You can configure and implement indexing strategies to control what causes Sitecore to update data in each search index. Before you read this blog post, please read the Sitecore 7: Introduction blog post linked in the list of resources at the end of this page.
Index update strategies provide a transparent and diverse model for index maintenance. You can apply multiple update strategies to each index, but the default configuration applies a single strategy to each index. It is especially important to avoid configuring multiple similar update strategies for a single index. Most importantly, due to the processing resources required, avoid rebuilding indexes more frequently than needed, which can happen if you choose the wrong set of strategies and do not do anything to prevent frequent rebuilds. Initialization and processing messages from indexing strategies appear in the crawling log.
The implementations of the default strategies exist in the Sitecore.ContentSearch.dll assembly within the Sitecore.ContentSearch.Maintenance.Strategies namespace. The configurations exist within the /configuration/sitecore/contentSearch/indexUpdateStrategies element in the Web.config file (technically, the /App_Config/Include/Sitecore.ContentSearch.Lucene.DefaultIndexConfiguration.config Web.config include file).
Elements within the /configuration/sitecore/contentSearch/indexUpdateStrategies element in the Web.config file (technically, the /App_Config/Include/Sitecore.ContentSearch.Lucene.DefaultIndexConfiguration.config Web.config include file) define available indexing strategies. You can get additional details about each indexing strategy from the comments above their definitions, as well as from the parameter values passed through the configuration factory to each strategy and for each index.
To implement a custom indexing strategy, in your Visual Studio project, create a class that implements the Sitecore.ContentSearch.Maintenance.Strategies.IIndexUpdateStrategy interface, add a definition for that strategy to the configuration, and update one or more index configurations to use that strategy. The IIndexUpdateStrategy interface requires that your class implement the Initialize() method accepting a single argument that implements the Sitecore.ContentSearch.ISearchIndex interface.
Hi John. I'm in the process of troubleshooting remoteRebuild strategy and wondering if you have any check list available? I've simulated a CM/CD isolated environment locally with Core replicating to a secondary sql server instance. For both Web and a sharded portion of Web, I have just the remoteRebuild strategy defined and am using the secondary folder setup for the index type. My assumption was that indexing from the control panel would raise the remote index end event. I don't see the strategy getting triggered. I've even built a custom remote strategy (dotnetpeek-ified) and added additional logging but not seeing the strategy triggered. Any ideas?
Hi John. I figured it out however it's a little misleading... The "reindex" operation in Control Panel doesn't actually kick off a full reindex which is the requirement for remoteRebuild to actually rebuild an index on a CD web front end. If however, one uses the Reindex operation from the developer toolbar, a full rebuild triggers and in turn triggers a rebuild on the remote CD front ends. Is there a way to configure the index actions on the control panel to always initiate a full rebuild? Thanks again! -Tim
Hi John! If I'd use IntervalAsynchronousStrategy in a multi-server environment, could be the same index update operations executed by multiple servers? E.g. "Title" was changed to "Title2" Server A picks up this change, in the same moment also server B picks it up and both perform the update before they saved the index updated date. Thanks, Tamas
Hello, I have to ask someone with more time and knowledge to look into these questions. Regards,
Hi John Thanks for the insight. We are having issue in one of our projects, where we have 2 CDs. Published data is available on the web db. But not reflecting on UI. We are not using any cache. There are no errors in log file. When we restart iis, the data appears. We started having this issue when we started adding subsites. Kindly advise. Our sitecore version is 7.2
Hi Kishore, Were you able to find a solution or root cause of this issue? We are on Sitecore 7.5 and we are seeing similar issues in our multiserver environment where Lucene indexes are apparently getting out of sync. Thanks Faisal
Hi John, Kishore and Faisal, I am encountering same issue on Sitecore 8. Can someone please suggest what needs to be done or is it an existing bug?