# Question about synonyms and analysis chain

**URL:** <https://discuss.elastic.co/t/question-about-synonyms-and-analysis-chain/46363>\
**Category:** Elasticsearch\
**Created:** [April 5, 2016, 9:38am UTC](https://discuss.elastic.co/t/question-about-synonyms-and-analysis-chain/46363 "2016-04-05T09:38:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Youxu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/youxu/32/117375_2.png) [@Youxu](https://discuss.elastic.co/u/Youxu)\
**Post date:** [April 5, 2016, 9:38am UTC](https://discuss.elastic.co/t/question-about-synonyms-and-analysis-chain/46363/1 "2016-04-05T09:38:37Z")

</div>

I am using following synonyms setting to try fetch documents containing windows if user query with either windo orwindos or windows:

"windo, windos,windows"

But it does not work for fields with english analyzer, I understand that is because for english analyzer, the "windows" is stemmed to "window" in inverted index tokens and since my synonym token filter is placed after "english\_stemmer" token filter, all query phrase "windo", "windos" or "windows" actually are not in inverted index tokens.

I know this could be resolved by place synonym token filter in front of english\_stemmer token filter, but I would like to learn if there is best practice on synonym design for my scenario?

---

<div class="post-metadata">

**Author:** ![Youxu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/youxu/32/117375_2.png) [@Youxu](https://discuss.elastic.co/u/Youxu)\
**Post date:** [April 6, 2016, 2:38am UTC](https://discuss.elastic.co/t/question-about-synonyms-and-analysis-chain/46363/2 "2016-04-06T02:38:08Z")

</div>

Can anyone help?

Is it safe/good practice to simply put the synonym token filter in front of the stemmer token filter of a language analyzer?

---

<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 5, 2017, 11:02pm UTC](https://discuss.elastic.co/t/question-about-synonyms-and-analysis-chain/46363/3 "2017-07-05T23:02:06Z")

</div>


