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

**URL:** <https://discuss.elastic.co/t/name-variation-search-pro-omega-proomega-pro-omega/192728>\
**Category:** Elasticsearch\
**Created:** [July 29, 2019, 2:38pm UTC](https://discuss.elastic.co/t/name-variation-search-pro-omega-proomega-pro-omega/192728 "2019-07-29T14:38:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![roman731](https://avatars.discourse-cdn.com/v4/letter/r/bc8723/32.png) [@roman731](https://discuss.elastic.co/u/roman731)\
**Post date:** [July 29, 2019, 2:38pm UTC](https://discuss.elastic.co/t/name-variation-search-pro-omega-proomega-pro-omega/192728/1 "2019-07-29T14:38:24Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Mark\_Harwood](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mark_harwood/32/10538_2.png) [@Mark\_Harwood](https://discuss.elastic.co/u/Mark_Harwood)\
**Post date:** [July 29, 2019, 2:58pm UTC](https://discuss.elastic.co/t/name-variation-search-pro-omega-proomega-pro-omega/192728/2 "2019-07-29T14:58:20Z")

</div>

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](https://github.com/elastic/elasticsearch/issues/42753) for example code and details of problems with phrase searches.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [August 26, 2019, 2:58pm UTC](https://discuss.elastic.co/t/name-variation-search-pro-omega-proomega-pro-omega/192728/3 "2019-08-26T14:58:27Z")

</div>

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