Search indexes may get rebuilt multiple times as a result of publishing


Description

Publishing to multiple publishing targets using Sitecore Publishing Service might result in rebuilding the same search indexes multiple times. Moreover, when publishing to only one publishing target, the indexes might be updated for all the publishing targets.

Solution

To prevent full index rebuild operations, update the configuration of the CM instances to increase the value of the remoteEventCacheClearingThreshold parameter to int.MaxValue that is 2147483647. The value must be patched by creating a configuration patch file in the \App_Config\Include\zzz folder.

Note: Make sure that the publishingservice:searchindex:rebuild event handlers are disabled on the CD instances that are not responsible for indexing, as recommended in Section 1.3.3 Configuring Cache Clearing and Indexing of Sitecore Publishing Service Module Installation and Configuration Guide. The publishingservice:searchindex:rebuild event handlers must be enabled only on the instances that are supposed to perform index updates.