Stem override question


(Joe Monastiero) #1

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


(Ivan Brusic) #2

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


(system) #3

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