Algolia: remove relevance



Hi everyone.

I need to remove Relevance from sorting menu. I am using Magento2.

Trying to comment: vendor/algolia/algoliasearch-magento-2/view/frontend/web/instantsearch.js:120

  name: algoliaConfig.indexName + '_products',
  label: algoliaConfig.translations.relevance

but getting error:
Uncaught Error: [sortBySelector]: Index magento2_dev_test_std_store_view_products not present in `indices

Any ideas how to remove relevace properly?

Thanks for any help.


Hi there,

I’m Dorian, software engineer at Algolia.

In order to assist you as best as I can, I need a bit more context about what you are actually trying to do:

  • What do you mean exactly by removing relevance?
  • Why are you trying to remove it? What are you trying to accomplish?

More generally speaking, I would advise you not to comment or modify anything in a vendor folder because the next time you update it, you will have to re-apply all your changes/comments inside it. If I have more context on what you’re trying to achieve, I may be able to help you find how to properly do what you want the normal way in our extension.

Thanks in advance.
Happy coding!