Sorting allows you to rearrange the search results based on any fields in ascending or descending order. By default, the search results are shown in order of relevancy. Sort rules can be applied globally for all the searches (site rule), specific search queries (search rule), or certain categories (category rule) which are browsed by the customers.
In the case of multiple-sort rules, the first rule will have precedence over the other subsequent rules.
You can always use sort rules when you want to show products with the highest ratings at the top and lower ratings at the bottom of search results.
How to apply the sort rule?
- Add a rule by following the steps given in this article.
- Now when you add a sub-rule, click the Sort tab in the left section.
- Click to add a rule in the Sort type rule.
- Configure a condition to match products.
- Select a field or attribute of a product like a name, price, brand, etc., then choose an order that can be either of the following:
- Ascending
- Descending
- Add more sorting conditions by repeating the above steps and clicking on the Add button in the rule configuration section.
- After you’re done, set a duration and click on the Save button to save this rule and make it active on your store.
Note: You cannot create boost, bury, slot, or pin rules when a sort rule exists. Only Include or Exclude rules are allowed.