Duplicate Record Sets

Hello

Record sets/indices seem to be duplicated so I have
magento_default_products_price_default_desc
magento_default_products_price_default_asc
magento_default_products_created_at_desc

Which are duplicates of
magento_default_products

My question is do I actually need magento_default_products_created_at_desc ? If I don’t how could I remove them without magento recreating them?

Hi!

These indices are what we call replicas. Replica indices are generated when you set sorting strategies: https://community.algolia.com/magento/doc/m2/indexing/#sorting-strategies

In Algolia, every index has a unique sorting strategy, which is statically defined at the index level. Pre-sorting at index time instead of at query time leads to a huge performance boost. Consequently, if you need different ranking formulas depending on the use case, you need one index per ranking formula.

You can read more about it in our docs: https://www.algolia.com/doc/guides/ranking/sorting/

Replicas aren’t exact duplicates: the data is the same, but the ranking is different.

In your case, you probably have set different sorting strategies in your Magento admin, which explains why you’re seeing those replica indices in your Algolia dashboard.

If you disable your sorting strategies, the associated replica indices will disappear.

Have a nice day!

Thanks for your reply! I have deleted the sorting option in Magento however it’s still showing in my Algolia dashboard do you know how long it might take to go?

Thanks
Will

Hi Will,

I just checked with our Magento team, you actually need to delete these by hand (and this time they won’t be recreated since you removed your sorting strategies).

Sorry for the confusion, we disabled automatic removal when we released our A/B testing feature to avoid accidental deletions.

Have a nice day!

So next complication is the one I’ve disabled in Magento is the only one that I can’t delete?