# When synonym overlapped with another synonym

**URL:** <https://discuss.elastic.co/t/when-synonym-overlapped-with-another-synonym/237902>\
**Category:** Elasticsearch\
**Created:** [June 20, 2020, 7:54am UTC](https://discuss.elastic.co/t/when-synonym-overlapped-with-another-synonym/237902 "2020-06-20T07:54:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![RUIS](https://avatars.discourse-cdn.com/v4/letter/r/eada6e/32.png) [@RUIS](https://discuss.elastic.co/u/RUIS)\
**Post date:** [June 20, 2020, 7:54am UTC](https://discuss.elastic.co/t/when-synonym-overlapped-with-another-synonym/237902/1 "2020-06-20T07:54:45Z")

</div>

Hi, I'm currently trying to setting up the synonyms and I noticed if a word overlapped with another word in the synonym dic, the token I got will only include one of them.

For example, If I have an analyzer using the following synonyms:  
` APPLE, FRUIT `  
` APLLE SAUCE, COOKING SAUCE`  
when I use this analyzer to some text fields contains a sentence "apple sauce is great"  
the tokens i got are  
`apple sauce(type:SYNONYM), is (type:ALPHANUM), great(type:ALPHANUM).`  
Thus my query will only return this document if I search for apple sauce or cooking sauce.

But I want to get this document even when people search for FRUIT SAUCE.

Is there anyway to do this? adding more synonyms could work but I can't do this since the file are extremly large

Any help will be appreciated

---

<div class="post-metadata">

**Author:** ![RUIS](https://avatars.discourse-cdn.com/v4/letter/r/eada6e/32.png) [@RUIS](https://discuss.elastic.co/u/RUIS)\
**Post date:** [June 20, 2020, 8:08pm UTC](https://discuss.elastic.co/t/when-synonym-overlapped-with-another-synonym/237902/2 "2020-06-20T20:08:42Z")

</div>

any suggestions?

---

<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:** [July 18, 2020, 8:19pm UTC](https://discuss.elastic.co/t/when-synonym-overlapped-with-another-synonym/237902/3 "2020-07-18T20:19:22Z")

</div>

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