Problem of Full Index Rebuild After Publishing

We are on Sitecore 9.2 + SXA 1.9 and using Sitecore Publishing Service. We had frequent complaints from Content Team and Marketers about the delay in published content appearing on the Live site. During analysis we observed multiple index rebuild jobs are queued for more than 12 hours, most importantly rebuild the same indexes multiple times.

If you are not already aware you can check the running/queued/completed job on <your sitecore instance>/sitecore/admin/jobs.aspx.

Later we learnt from Sitecore Support that 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.

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.

Also make sure that the publishingservice:searchindex:rebuild event handlers are disabled on the CD instances that are not responsible for indexing, the publishingservice:searchindex:rebuild event handlers must be enabled only on the instances that are supposed to perform index updates.

The Sitecore.Publishing.Service.Delivery.config is responsible for raising events to
rebuild the search indexes and clear data caches on the target instance.
If additional custom indexes have been created on a Sitecore instance, each index name must be
added to the publishingservice:searchindex.rebuild setting in the IndexNames section:

<event name="publishingservice:searchindex:rebuild">
 <handler type = "Sitecore.Publishing.Service.Delivery.TargetSearchIndexRebuildHandler,
Sitecore.Publishing.Service.Delivery" method="RebuildTargetSearchIndex">
 <IndexNames hint="list:AddIndex">
 <index>sitecore_web_index</index>
<customIndex>MyCustomIndex</customIndex>
 </IndexNames>
 </handler>
 </event>

The following table describes the configuration that is required to support different setups:

For more details refer the Section 1.3.3 Configuring Cache Clearing and Indexing of Sitecore Publishing Service Module Installation and Configuration Guide.

Hope this helps.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Website Powered by WordPress.com.

Up ↑

%d bloggers like this: