We are using Sitecore SXA 1.6 built-in sorting by title and we find that when title has, for example, two words sorting doesn't work in right way i.e sorting depending on the second word in the title instead of the first word any advice how to let it work properly


To start playing with sorting first you need to create facet item in your site (here: /sitecore/content/TENANT/SITE/Settings/Facets/). Here is an example facet for Title field:

enter image description here

Field Name is important here. This will tell the search engine to sort by what field.

Later on, you need to create sorting definition which will be used by SXA renderings. Navigate to /sitecore/content/TENANT/SITE/Data/Search/Sort Results and take a look at Title:

enter image description here

Here you need to select Facet and Direction in which you want to sort (ascending or descending).

In SXA we are not modifying the way how search provider (Solr, Lucene or Azure) is sorting. We are just passing facet (field name) and sort direction.

| improve this answer | |
  • Hi,this exactly what we did what I'm asking for is the result of sorting is't as expected i.e if we have titles ( Navigation, sitecore expectation,News) what is expected result is (Navigation,News, Sitecore Exception) but what we get from sorting now is (SItecore Exception , navigation ,news ) any reason for that result !! – R.Asaad Jun 7 '18 at 9:24
  • It's a matter of how particular search provider will sort results. E.g.: Solr has plenty of configuration options. – Dawid Rutkowski Jun 7 '18 at 10:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.