Solr – Facet Configuration to Index level

Let’s discuss something about SOLR configurations like how the facet are displayed and how to modify the configurations of SOLR facet Search. And this is explained in a simple way below with the changes that needs to be updated in the related file.

So let’s begin the detailed post of the concept,

By default, the SOLR facet sorting will be configured to get in the sorting based on the product count. this default setting can be changed to sorting based on the index level by doing simple changes to the facet configuration in the “WC-SEARCH.XML”. And this xml is responsible for the configurations for the facets and the search related data for the e-commerce site. so let’s begin the changes that will be counted as sorting of the facets on the basis of index level instead of the default thing like count level to index level for this we need to do the below-mentioned changes in the xml file.

Open the wc-search.xml file and do the changes as mentioned below,

locate the below mentioned line of code:

<_config:param name="sort" value="count"/>

And change the above default code to the below mentioned lines of code so that the sorting in changed to index level instead of the count level, and this sorting is happened alphabetically so for this we need to change the line of code to below mentioned line,

<_config:param name="sort" value="index"/>

Save the above made changes and restart the RAD toolkit to get the changes updated on the site-level.

Leave a Reply