Error due to large terms when rebuilding the xDB search index in Azure Search or Solr

  • Rebuilding the xDB search index might fail with an error when processing large terms, which are more than 32766 bytes. This happens because Azure Search and Solr providers have a limit on the maximum size of a single term in the search index. Errors similar to the following can be found in the log records:

    Failed to repeat processing: key: c315df92-d019-0000-0000-054e908dff7c
    msg: Field 'facets_keybehaviorcache_pageevents_data_ss' contains a term that is too large to process. The max length for UTF-8 encoded terms is 32766 bytes. The most likely cause of this error is that filtering, sorting, and/or faceting are enabled on this field, which causes the entire field value to be indexed as a single term. Please avoid the use of these options for large fields.
  • To resolve the issue, consider one of the following options:
    • Sitecore must not produce such long terms. To achieve this, you must treat filterable, sortable, and facetable attributes with care and only use them when necessary (recommended).
    • Perform the following steps:
      1. For Sitecore XP 9.0.2, download and install the following hotfix according to the instructions from readme.txt: SC Hotfix
        Be aware that the hotfix was built for a specific Sitecore XP version, and must not be installed on other Sitecore XP versions or in combination with other hotfixes. If any other hotfixes have already been installed on a certain Sitecore XP instance, send a request for a compatibility check to Sitecore Support. Note that the ZIP file contents must be extracted to locate installation instructions and the related files inside.
      2. Restart your xConnect Search instance and xConnect IndexWorker Windows service.
      3. Rebuild your xDB index according to the Sitecore documentation for Solr or Azure.
      To get a solution for other releases, contact Sitecore support.

Applies to:

CMS 9.0 Update-1 - 9.0 Update-2

CMS 9.1 Initial Release

May 01, 2020
May 01, 2020

Reference number: