Configuration
Ranking Rules
Control how search results are ordered and prioritized.
Overview
Ranking rules determine the order in which search results appear. SearchX uses a combination of AI-powered relevance scoring and configurable rules to deliver the best results for each query.
Default Ranking Order
SearchX applies ranking rules in the following default order:
- Sort: Query-time sort rules (applied first when specified)
- Typo: Number of typos between query and matches
- Words: Number of query terms found in the document
- Proximity: Distance between matched query terms in the document
- Attribute: Attribute ranking order (searchable attributes priority)
- Exactness: Similarity of matched words to query terms
Sorting by an Attribute
The Sort rule applies when a search asks for a specific order — for example when a shopper picks an option from the widget's "Sort by" menu, or when you pass the sort parameter through the Search API. The attribute must be sortable in your search settings.
price:asc # Show cheapest products first
price:desc # Show most expensive products first
Custom Sort Rules
Sorting is chosen per search, not saved as a custom ranking rule. Adding custom sort rules in the dashboard is not available yet — use the sort parameter instead.
Configuring Rules
- Go to Applications > your app > Settings.
- Scroll to the Ranking Rules section.
- Drag and drop the rules to change their priority order.
- Click Save to apply changes.
Test Before You Ship
Reordering ranking rules changes how every search is ordered. Use the Playground to see how a new order affects results before your shoppers do.