How to disable Solr index statistic requests


Description

The article describes the ContentSearch.IndexingManager.DisplayShortStatistic setting that was introduced in Sitecore XP 10.0.0 and is used to disable Solr index statistic requests. This setting is determined in the Sitecore.ContentSearch configuration file as follows:

<!--  INDEXING MANAGER - DISPLAY SHORT STATISTIC
            This setting specifies whether or not to display short index statistics in the Indexing Manager Wizard.
            When enabled, the Indexing Manager Wizard does not request additional information from Solr to populate index statistics.
            It can be required if nodes of Solr Cloud can be accessed only within a private network.
            Default value: false
-->
<setting name="ContentSearch.IndexingManager.DisplayShortStatistic" value="false"/>

The value of the ContentSearch.IndexingManager.DisplayShortStatistic setting must be changed to true if there is no direct access from the Sitecore indexing instance to individual Solr nodes. If the setting value is not changed to true, opening the Indexing Manager might fail with an unhandled exception. The following message can be found in the logs:

ERROR Unable to connect to the remote server
Exception: SolrNet.Exceptions.SolrConnectionException
Message: Unable to connect to the remote server
Source: SolrNet
   at SolrNet.Impl.SolrConnection.Get(String relativeUrl, IEnumerable`1 parameters)
   at SolrNet.Impl.SolrCoreAdmin.Status(String coreName)
   at Sitecore.ContentSearch.SolrProvider.SolrCloudIndexSummary.GetReplicaIndex(Replica replica)
   at System.Linq.Enumerable.<>c__DisplayClass7_0`3.<CombineSelectors>b__0(TSource x)
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   at System.Linq.Enumerable.Sum(IEnumerable`1 source)
   at Sitecore.ContentSearch.SolrProvider.SolrCloudIndexSummary.get_NumberOfDocuments()
   at Sitecore.ContentSearch.Client.Forms.IndexingManagerWizard.BuildIndexCheckbox(String name, String header, ListString selected, ListString indexMap)

or

Exception: System.NullReferenceException
Message: Object reference not set to an instance of an object.
Source: Sitecore.ContentSearch.SolrProvider
   at Sitecore.ContentSearch.SolrProvider.SolrIndexSummary.get_NumberOfDocuments()
   at Sitecore.ContentSearch.Client.Forms.IndexingManagerWizard.BuildIndexCheckbox(String name, String header, ListString selected, ListString indexMap)

Important note

To add the ContentSearch.IndexingManager.DisplayShortStatistic configuration setting to Sitecore XP versions earlier than Sitecore XP 10.0.0, download and install the latest cumulative hotfix compatible with your product version: