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:
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:
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.