接続タイムアウトの指定

Version:
日本語翻訳に関する免責事項

このページの翻訳はAIによって自動的に行われました。可能な限り正確な翻訳を心掛けていますが、原文と異なる表現や解釈が含まれる場合があります。正確で公式な情報については、必ず英語の原文をご参照ください。

Sitecoreは、インデックス操作、検索クエリの実行、Solrスキーマの管理、Solrコアの管理のためにSolrサーバーと対話します。デフォルトでは、Sitecoreは、リクエストの目的に関係なく、すべてのリクエストに同じタイムアウト設定を使用します。

ただし、目的が異なる要求では、要求タイムアウト値が異なると便利な場合があります。例えば、Solrスキーマを更新したり、Solrコア・プロパティーを変更したりする要求はまれであるため、そのような操作のタイムアウトを長くしてもかまいません。一方、検索クエリでは、タイムアウトが長すぎると、システム全体のパフォーマンスが低下する可能性があります。

したがって、次の3つの異なるタイプの操作に対して、個別の接続タイムアウト値を指定できます。

  • Admin: コア管理操作に使用されます。これらの操作の完全な一覧は、SolrのWebサイトで確認できます。

  • クエリ: 通常の検索クエリに使用されます。

  • デフォルト: 上記のいずれにも該当しない操作に使用されます。

個別の接続タイムアウト値を有効にして指定します。

  1. App_Config\Include\Examples\Sitecore.ContentSearch.Solr.ConnectionSettings.config.exampleファイルの名前を「App_Config\Include\Examples\Sitecore.ContentSearch.Solr.ConnectionSettings.config」に変更します。

  2. adminquerydefaultに必要な値(ミリ秒単位)を指定します。

    <sitecore search:require="solr">
    <contentSearch>
      <indexConfigurations>
    
        <!-- HTTP WEB REQUEST FACTORY
             Allows you to override the http web request factory. This factory class is responsible for creating IHttpWebRequest's.
        -->
        <solrHttpWebRequestFactory type="HttpWebAdapters.HttpWebRequestFactory, SolrNet" />
    
        <!-- SOLR CONNECTION CONFIGURATIONS
    	     Allows to configure connections to Solr which are used for different types of operations.
        -->
        <solrConnectionConfigurations>
    
          <!-- Connection configuration used for the CoreAdmin operations. -->
          <solrConnectionConfiguration name="admin">
            <timeout>0</timeout>
            <!-- This connection type requires the 'usePost' element is set to 'false'. -->
            <usePost>false</usePost>
          </solrConnectionConfiguration>
    
          <!-- Connection configuration used for the Query operations. -->
          <solrConnectionConfiguration name="query">
            <timeout>0</timeout>
            <usePost>false</usePost>
          </solrConnectionConfiguration>
    
          <!-- Connection configuration used for the rest of operations. -->
          <solrConnectionConfiguration name="default">
            <timeout>0</timeout>
            <!-- This connection type requires the 'usePost' element is set to 'false'. -->
            <usePost>false</usePost>
          </solrConnectionConfiguration>
        </solrConnectionConfigurations>
      </indexConfigurations>
    </contentSearch>
    </sitecore>
この記事を改善するための提案がある場合は、 お知らせください!