Name variation search (Pro Omega, ProOmega, Pro-Omega)

I use elastic to search for products in an index and have an issue where I have a product called "ProOmega" and the issue is when "Pro Omega" is searched I get no results. Ideally if I search for "ProOmega", "Pro Omega", "Pro-Omega" all these queries would give me back the "ProOmega" product.

I have a pretty basic whitespace analyzer on my name field.

I've tried playing around with some fuzziness but couldn't get a good solution. I think the issue comes from the fact that "Pro Omega" is broken into two tokens but the actual product "ProOmega" is a single token.

I think one solution could be to add a character filter to convert spaces to "nothing" but I fear it might affect other search results.

Is there any better solution to this problem?

You can define synonyms for these but that can get tedious to maintain as the list grows long.
An alternative is to index using "spaceless shingles" - pairs of words without a space between.

This works for regular match queries but has an issues with match_phrase query types.
See this issue for example code and details of problems with phrase searches.

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