Search by all variants of a value

Hello,

I have an application where the user can search for beauty products. Let's say the user wants to find all products from L'Oréal company. So when he goes to the search, he might type: LOREAL, L'OREAL, L'oreal, L'oréal or loreal.
At the moment, they don't get any result since they didn't type exactly L'Oréal.

How can I handle this case?

You can either:

  • use synonym token filter, and define all these terms as synonyms.
  • use ascii folding and lowercase filters to bring terms into more canonical form.
  • use french analyzer
  • use fuzzy query , but you should be careful with this as it may return too many irrelevant results

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.