Search input with hypen/slash

Hello,

is there a solution for my existing problem (dahboard solution):

Orginal product name: 650 5D ZHKH 5 Z
Search Input from the Customers: 650-5D-ZHKH-5-Z

Many customers are saving our products names with hypens or slash signs. In fact they copy the product name from their Excel-list with slash or hypens into our search engine. As a result, they will not get a search result.

How can I handle this problem with an dashboard solution? I tried with the synonym function --> hypen/slah = blank -->does not work.

Thanks a lot!

Marcel

Hello Marcel,

By default, Algolia doesn’t take characters like hyphens and slashes into account when it tokenizes your records. You don’t need to setup anything else.

This means that, for the following records:

[
  {
    "product_id": "650/5D/ZHKH/5/Z"
  },
  {
    "product_id": "650-5D-ZHKH-5-Z"
  },
  {
    "product_id": "650 5D ZHKH 5 Z"
  }
]

You could search for either "650/5D/ZHKH/5/Z", "650-5D-ZHKH-5-Z" or "650 5D ZHKH 5 Z" and it would yield all 3 results.

You can learn more about how we tokenize words in our documentation: https://www.algolia.com/doc/guides/textual-relevance/languages/#word-separators

Have a great day!