Override Bloomreach Algorithms
This use case covers how to override the Bloomreach algorithm and rank results using custom attributes on the Search API.
In this example, we override the default ranking and boost the impact of the Sitewide ATC signal. We also sort high-margin products at the top of the product grid. You can tweak this use case per your needs.
Features used
We suggest that you go through the below guides to understand this use case better:
How to implement use case
Follow the respective workflows to implement the use case:
Dashboard workflow
1. Navigation
-
Go to Search & Merchandising → Site search → Ranking rules.
-
Click the + New ranking rule button to create a new ranking rule.
-
Enter the desired search term(s) that will trigger the attribute rule
-
Now, click the Attribute tab. Click the Create New Attribute Rule button.
2. Create Algo Weight rule
-
To override the Bloomreach algorithm and boost the Sitewide ATC signal, we create an Algo weighting rule, as shown below. The boost strength is set to 50. This will ensure that the signal has more influence on the ranking score compared to other signals.
-
Since we want the boost factor to apply on top of the existing ranking score, we select Use default ranking.
-
Once the algorithm customizations are complete, Save the rule.
API workflow
Send custom attribute on the API
To prioritize high-margin products and sort them higher in the search results, pass the sort parameter with the “custom_margin” attribute.
/api/v1/core/?q=dress&sort=custom_margin+desc
This will sort the high-margin products to the top of search results. The API request looks like this:
GET https://core.dxpapi.com/api/v1/core/?
account_id=<Bloomreach Provided Account ID>
&domain_key=example_com
&request_id=8438674518839
&url=http://www.example.com/index.html?q=dresses
&request_type=search
&search_type=keyword
&q=dress
&rows=10
&start=0
&fl=pid,title,brand
&sort=custom_margin+desc
By combining the workflow on the Dashboard and API end, you can effectively override the algorithm, optimize search ranking for Sitewide ATC, and promote high-margin products.
Updated 2 months ago