How to improve and optimize Sitecore Solr Search Performance?

How to improve and optimize Sitecore Solr Sea..

How to improve and optimize Sitecore Solr Search Performance?
Friday 17th December, 2021
How to improve and optimize Sitecore Solr Search Performance?

Solr has been rapidly gaining popularity for Sitecore implementations due to its features, scalability, and performance. Site search is the main function of any Sitecore; however, sometimes, their performances become slow due to poor configuration of Solr or inappropriate use of Solr. There are a variety of ways how Sitecore Solr performance can be improved. 

Here are a few ways to optimize Sitecore Solr Search performance: 

 

Create custom Indexes: Search performance largely depends on data size in the search box; the more the data in the search box, the more it will take time to search and index the data during index building. 

 

Search performance will impact if you use Sitecore's default indexes that are sitecore_web_index or site_master_index. 

 

Hosting infrastructure: Sitecore Solr might require their own web servers depending on how content is indexed and searched and your application functionality. You cannot use default Sitecore index strategies of your web server without understanding how they respond under load. If you're storing indexes on multiple web servers locally, put index monitors in place to keep indexes in Sync. Through Solr consulting, you can optimize your hosting infrastructure for better performance.

 

Set " auto-commit" to 2 minutes: Softcommit achieves near-real-time, also called NRT indexing, by the opening of a new search after a specific time interval; it occurs more frequently than hard commit. Moreover, it's less expensive and doesn't start a new transaction log every time or write indexes on a disk. It should be set for as long as the application allows you for better performance. However, sitting for 2 minutes can be beneficial. 

 

Payload: Every search call should only bring back the data that needs to be displayed on search results. It's important to limit what's to be displayed. The payload should be limited to only Solr fields that are needed to be displayed; the rest entity fields should be returned and processed after retrieving results. Limiting the number of search calls on results is good but not the best. However, if you're switching to Azure search, you probably would implement the limited fields. Utilizing Solr support effectively with a limited payload will improve performance. 

 

Use the default of true for sorted query and lazy fields: If most query requests are only a subset of fields, setting the default true value can boost performance. Setting enableLazyFieldLoading allows Solr fields that are not requested directly later when required. Such a method will keep your application from load and enhance performance. However, there may be times when the same queries are requested multiple times but with a different ordering. Using the useFilterForSortedQuery setting can help you improve performance as Solr will use a filter to satisfy cache results. Apache Solr consulting can help you enable such a setting to optimize your Solr performance. 

 

Set Maxam MB: Sometimes search results utilize a large part of cache memory that slows down performance. The query Result cache allows you to set a limit to the cache memory. They make sure the query does not utilize a large part of cache memory. 

 

Final Thoughts: Solr search configuration might be complex and difficult to understand, but their ways to improve or resolve issues are subtle. Paying close attention to minor details will improve your Sitecore Solr search performance. 

Related articles