Search functionality in Sitecore Client may not work if some items are not included into any search index


Description

Sitecore client search-related functionality, such as the Content Tree search, the Start bar search, the Search tab, the Multilist with Search field, etc. may not work properly when:

The following exception may appear in Sitecore log files:

Exception: System.ArgumentNullException
Message: Value cannot be null.
Parameter name: key
Source: mscorlib
   at System.Collections.Generic.Dictionary`2.FindEntry(TKey key)
   at System.Collections.Generic.Dictionary`2.TryGetValue(TKey key, TValue& value)
   at Sitecore.ContentSearch.ContentSearchManager.GetIndex(String name)

Solution

To fix the issue apply the patch below:

  1. Copy the Sitecore.Support.425362.dll assembly to the \bin directory of your website.
  2. Copy the Sitecore.Support.425362.config file to the \App_Config\Include directory of your website.

The patch introduces a DefaultMasterDBIndexName setting, which is set to sitecore_master_index by default.
The index specified in this setting will be used as a fallback when no context index is found for the particular search operation in Sitecore Client. This index should cover the entire master database to prevent the issues described in the article.