Shopify App - Product Default Index Relevance - Odd / Idiosyncratic Behavior

Algolia’s Default Product Index (Relevance Index) is ranking a newly created / imported / updated product higher than an older or previously created / updated Shopify products. This basically means if you are selling a piece of cutting board, for example (L x W in inches), 10 x 10, 10 x 12, 10 x 15, … 36 x 48, 48 x 60 and import products from smallest size to largest size. The last product imported, in this case 48 x 60 will always rank the first. But in reality, most people purchase the smallest 10 x 10.

I have confirmed this Relevance’s ranking behavior by manually updating the 10 x 10 product, by changing description, adding a blank space and then deleting the same blank space. Then the Product Index (By Relevance) is ranking the 10 x 10 product first after the update.

Is there a way to change the Shopify Product Relevance Index’s ranking algorithm to actually rank the older products higher than the newer products? Is this behavior configurable? Or, we have to use Custom Ranking Tie-breaking?

Additionally, we are using Algolia for Shopify Collection Filtering — For indexing within a Shopify Collection, is there a way to rank products within the Collection with a manually assigned integer number, say 1, 2, … 100, with 1 ranked highest? If we use Custom Ranking Tie-Breaking, the tie-breaking will affect all searches, right?

Thank you! Happy Holidays and Happy New Year!

Hi,

Thanks for reaching us. I am Alex developer at Algolia working on the Shopify Integrations. Nice to meet you !

Is there a way to change the Shopify Product Relevance Index’s ranking algorithm to actually rank the older products higher than the newer products? Is this behavior configurable?
I am not sure what you meant by Custom Ranking Tie-breaking ? If you go on Algolia’s dashboard in your product index, you’ll see a category “Ranking formula & Custom Ranking”, you can specify the “created_at” attribute, this should do the trick.

Additionally, we are using Algolia for Shopify Collection Filtering — For indexing within a Shopify Collection, is there a way to rank products within the Collection with a manually assigned integer number, say 1, 2, … 100, with 1 ranked highest?
I am not sure to understand this one, you’re looking to promote product on the collection page of Shopify ? Am I right ? If that is the case, this tutorial will help you to implement query rules on the collection page :

In order to create Query Rule on a specific collection page, for example, having a specific product at the first place for the “Dresses” collection, you will have to follow those steps:

  1. Update your theme’s instant search code to provide Query Rule context
    Go to your theme code via the Shopify Admin and edit the algolia_instant_search.liquid.js file.
    You will have to add a custom code snippet in the “searchFunction” (around line 48).
    Just before the line: “helper.setPage(page);”, add the following:
    if (!!collectionFacetValue) {
    helper.setQueryParameter(‘ruleContexts’, [ collectionFacetValue ]);
    }

Then save the file.

  1. Go to your Algolia Dashboard and create a Query Rule

Now that the instant search code will send us a Query Rule Context for each query that comes from a collection page, we can create collection specific query rules.
In order to do so, you will have to provide a context to the Query Rule, by putting the “slug” of the targeted collection.


You can find the slug of the targeted collection in the URL of your shop, for example: https://myshop.myshopify.com/collections/dresses-winter

Once the context filled, just add consequences (promote a result) and then save the Query Rule.