The promotion topic, also called boosting, is an advanced one, which requires some Algolia knowledge. Specifically, an understanding of our ranking formula and custom ranking mechanism can definitely be helpful here.
The basic idea is that, in Algolia, the way to influence how results are sorted is the custom ranking.
With the Shopify extension, by default, we use the number of sales of a variant since the last complete reindex to rank them.
To confirm this, head to your Algolia Dashboard > Indices >
shopify_products > Ranking.
You should see a list like this:
This is an highly relevant metric : product that you sell the most will be shown first.
However, new products will also be at a disadvantage in that set-up, and you might also want to promote them, how do you do this?
There are two solutions to this question:
- A per query solution
- A generic solution
Per query boosting
Algolia has recently released a feature called Query Rules, which allows us to override the default behavior for specific queries. Inside the Shopify app, we’ve built what we call a Merchandising tool, which makes use of those rules to allow you to re-order search results for specific queries.
This tool even allows you to add products that wouldn’t match the query. For instance, you could have an
iPhone showing up for a
"samsung galaxy" query:
Under the hood, it uses the
promote feature of Query Rules.
The amount of Query Rules is limited by your plan, see our pricing page for more information and contact our sales if you need more.
If you want to promote a product for all searches, then you’ll need a new attribute stored in Algolia. The idea would be to add this attribute in the custom ranking described above, so that it would take precedence over the
There are two supported ways of adding such an attribute in your Algolia records:
Whichever solution you choose to use, you’ll need to configure our Shopify app to make use of it in the Indexing tab of the app.
Adding a metafield or enabling named tags will, in both cases, trigger a complete reindex, as we need to update every product in your Algolia index. This can take hours, you can track its progression at the bottom of the Indexing tab.
Once complete, try adding a metafield or named tag to a specific product, and check if it’s correctly propagated to your Algolia index:
This is how you’ll now be able to promote search results.
If it is, you then simply need to add it to your custom ranking, before