Solrインデックス統計リクエストを無効にする方法


解説

この記事では、Sitecore XP 10.0.0で導入された、Solrのインデックス統計リクエストを無効にするために使用されるContentSearch.IndexingManager.DisplayShortStatistic設定について説明しています。この設定は、Sitecore.ContentSearch設定ファイル内に以下のように記載されています。

<!--  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"/>

Sitecore indexing インスタンスから個々のSolrノードに直接アクセスできない場合は、ContentSearch.IndexingManager.DisplayShortStatistic設定の値をtrueに変更する必要があります。 設定値がtrueに変更されていない場合、インデックス マネージャーを開くと、未処理の例外で失敗することがあり、その場合次のメッセージがログに出力されます。

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)

もしくは以下のメッセージの場合もあります。

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)

重要な注意点

Sitecore XP 10.0.0より以前のバージョンにContentSearch.IndexingManager.DisplayShortStatistic構成設定を追加するには、お使いの製品バージョンに対応した最新の累積的なHotfixをダウンロードしてインストールしてください。