Configuring Custom Ranking for Business Relevance
On this page
The ranking attributes need to be preconfigured by your data engineering team.
To configure custom ranking for business relevance:
- Go to the Index page in the Algolia dashboard
- Select the index which you want to configure
- Go to Configuration
Select Ranking and Sorting
- To add a custom ranking attribute, click Add custom ranking attribute
If you add custom ranking attributes, they appear at the bottom of the Ranking and sorting list. Select the desired sort order for each attribute: ascending or descending.
Optional: set up different custom ranking criteria for different indices, for example, to use different sorting strategies
- Review and save the configuration
For more guidance on configuring relevance, visit the Algolia Academy.
Examples of custom ranking strategies
There are several strategies for setting up custom ranking. Which strategy you should choose depends on how often your data changes and how many pieces of data there are.
To implement custom ranking, you need to collaborate with your data engineering team.
Reducing granularity of custom ranking values
If you want to use multiple custom ranking attributes to get a good mix of results, you should reduce the granularity of each attribute, or the other attributes may never be used.
To reduce the granularity of your custom ranking attribute, you can:
Create tiered buckets (data binning)—create a tier for each value and send Algolia the tier each record belongs to. This is especially useful for values that are close together.
Use logarithms—logarithms make differences between values smaller, allowing them to be binned together. This reduces granularity when the range of an attribute is large.
Embedding business logic in the custom ranking
You can tweak the custom ranking according to your business needs by embedding business-relevant attributes as custom ranking attributes. For example a ranking based on:
- A brand, for example,
- A category, for example,
- Availability of stock, for example,
- Sales margins, for example,
- Internal popularity metrics, for example,