Rebuilds failing at the document validation phase

In this article

Symptoms

When performing a rebuild, the process fails at the DocumentsValidation phase and items that were deleted from Sitecore aren’t deleted from the index.

Cause

The DocumentsValidation phase comprises two main steps:

  1. Coveo for Sitecore checks whether the crawled items are searchable. This check involves HTTP requests to the Coveo Platform Search API via the reverse proxy REST endpoint. When the host server’s reverse proxy endpoint isn’t working or doesn’t respond, the rebuild fails and terminates.

    Note

    These REST endpoint proxy issues are sometimes firewall-related, where the CM server can’t reach the CD hosting the reverse proxy endpoint. They also often occur in Azure-hosted Sitecore environments.

  2. Coveo for Sitecore deletes old items from the index, meaning items that have been deleted from Sitecore but remain in the index. When the rebuild fails at the searchability validation step, this deletion step isn’t performed.

Resolution

To resolve this issue, ensure that the reverse proxy REST endpoint on the host (its default relative path is coveo/rest) is accessible from the indexing CM server and that it’s working correctly.

Workaround

You can disable the searchability validation step in the indexing process so that the deletion of old Sitecore items can proceed and the rebuild can complete successfully.

Note

The searchability validation step is primarily a legacy feature. Disabling it while introducing a DeleteOldDocumentsDelay is safe.

To disable the searchability validation step

  1. Open the Coveo.SearchProvider.Custom.config file located in <SITECORE_INSTANCE_ROOT>\App_Config\Include\Coveo in a text editor.

  2. Add the following settings as children of the configuration/sitecore/settings element:

    <setting name="Coveo.Indexing.CommittedDocumentsPollingEnabled" value="false" />
    <setting name="Coveo.Indexing.DeletedDocumentsPollingEnabled" value="false" />
    <setting name="Coveo.Indexing.DeleteOldDocumentsDelay" value="00:05:00" />
  3. Save your changes.