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:

  1. Sort: Query-time sort rules (applied first when specified)
  2. Typo: Number of typos between query and matches
  3. Words: Number of query terms found in the document
  4. Proximity: Distance between matched query terms in the document
  5. Attribute: Attribute ranking order (searchable attributes priority)
  6. 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

  1. Go to Applications > your app > Settings.
  2. Scroll to the Ranking Rules section.
  3. Drag and drop the rules to change their priority order.
  4. Click Save to apply changes.
Configuring ranking rules in the SearchX dashboard.

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.

Previous
Voice Search