Ranking and sorting by some attributes

I have some attributes:
product_status_date_int, has_french_language,has_image and is_new_description.

I need to make settings via algolia pannel on magento, so they should sort by
desc(product_status_date_int)

and after ranking by:
desc(product_status_date_int)
desc(has_french_language),
desc(has_image)
desc(is_new_description)

I trying to apply to Products’ indices extra settings field:

{“ranking”:[“desc(product_status_date_int)”, “typo”,“geo”,“words”,“filters”,“proximity”,“attribute”,“exact”, “custom”], “customRanking”:[“desc(product_status_date_int)”,“desc(has_french_language)”,“desc(has_image)”,“desc(is_new_description)”]}
`

but cannot see new sort by desc(product_status_date_int) in algolia admin pannel .

Hi @projdevel,

If I understand correctly, you would like to sort your index by product_status_date_int in descending order, and you would like this ranking criteria to take precedence over textual relevance (example: a product that has product_status_date_int higher than others would be ranked before other products, even if it matches the query but only with typos whereas other products match exactly the query). Is that correct?

This can affect the relevance of results and we usually do not advise to do this in your main index but rather in replica indices. The way to create a replica index with this specific sort order is to use the “sort” option in your Magento admin panel in Stores > Algolia Search > InstantSearch results page: https://www.algolia.com/doc/integration/magento-1/how-it-works/front-end/?language=php#instant-search-results

If this is not what you are trying to do, could you please write to support@algolia.com with

  • an explanation of your business use case
  • your app ID and the index name you want to achieve this on,
  • and provide us support access here: https://www.algolia.com/account/support, so that we can reproduce the issue and have more information about what might be wrong.

Thanks!