# Stem override question

**URL:** <https://discuss.elastic.co/t/stem-override-question/135769>\
**Category:** Elasticsearch\
**Created:** [June 13, 2018, 4:46pm UTC](https://discuss.elastic.co/t/stem-override-question/135769 "2018-06-13T16:46:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Joe\_Monastiero](https://avatars.discourse-cdn.com/v4/letter/j/c0e974/32.png) [@Joe\_Monastiero](https://discuss.elastic.co/u/Joe_Monastiero)\
**Post date:** [June 13, 2018, 4:46pm UTC](https://discuss.elastic.co/t/stem-override-question/135769/1 "2018-06-13T16:46:58Z")

</div>

We have a fashion index. We do not want the word "shorts" to be stemmed to "short" in a search for shorts. "short" delivers "short dresses", "short sleeve shirts", etc. Can someone help provide and example of the rule(s) we would need to use to improve/narrow this search to "shorts" only?

Thanks in advance!

Joe

---

<div class="post-metadata">

**Author:** ![Ivan](https://avatars.discourse-cdn.com/v4/letter/i/df788c/32.png) [@Ivan](https://discuss.elastic.co/u/Ivan)\
**Post date:** [June 13, 2018, 5:00pm UTC](https://discuss.elastic.co/t/stem-override-question/135769/2 "2018-06-13T17:00:58Z")

</div>

You can use the keyword marker filter to protect words from being stemmed. It is important that you place this filter before your stemmer in the analysis chain.

[https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-keyword-marker-tokenfilter.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-keyword-marker-tokenfilter.html)

---

<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 11, 2018, 5:01pm UTC](https://discuss.elastic.co/t/stem-override-question/135769/3 "2018-07-11T17:01:01Z")

</div>

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