Performance optimizations when using Solr

  • When using Solr as the search provider for Sitecore, there are a variety of Sitecore settings that can be tuned to improve performance. Symptoms might include high memory consumption by Sitecore services, slow average response times for the xConnect search services, or the inability of Solr to complete durable back-ups of the xDB index. 

    Note: these are Sitecore specific settings, not Solr ones. Please refer to the Solr documentation as the reference on configuring Solr.

  • ContentSearch.SearchMaxResults

    Controls the number of search results the search provider is requested to retrieve.
    A large number of requested documents puts a strain on the Solr server, network, and Sitecore which has to deserialize all the results.

    The value of the setting can be overridden on per-query basis using Take or Page LINQ extensions.
    We recommend you to always specify the number of requested documents in the query.

    As a safety net, you might want to reduce the value of the ContentSearch.SearchMaxResults setting.
    The exact value must be carefully evaluated as part of the overall Sitecore implementation and thoroughly tested as part of the development process.

    Note that ContentSearch.SearchMaxResults should be set in all Sitecore XP instances.

    MaximumCommitMilliseconds

    We recommend you to increase the MaximumCommitMilliseconds setting to 600000 (10 minutes) in the \App_data\jobs\continuous\IndexWorker\App_data\Config\Sitecore\SearchIndexer\sc.Xdb.Collection.IndexWriter.SOLR.xml file for the xConnect search service:

    <MaximumCommitMilliseconds>600000</MaximumCommitMilliseconds>

    Sitecore XP can place a heavy load on the xConnect search service in certain high traffic scenarios. When using Solr as the search provider, an implementation might observe high average response times for the xConnect search service. This can be addressed by tuning this setting.

    MaximumCommitMilliseconds should be set in the XConnectIndexWorker service.

  • For more information about the xConnect search indexing service, see the following:

    For more about setting up Solr for Sitecore XP and the maximum search results:

Applies to:

CMS 9.0 Initial Release+

February 26, 2020
July 17, 2020

Keywords: 

  • Performance,
  • Search and Indexing