# Protect keywords from filter other than Stem

**URL:** <https://discuss.elastic.co/t/protect-keywords-from-filter-other-than-stem/9511>\
**Category:** Elasticsearch\
**Created:** [October 31, 2012, 3:21pm UTC](https://discuss.elastic.co/t/protect-keywords-from-filter-other-than-stem/9511 "2012-10-31T15:21:53Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Giorgos\_Tsiftsis](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/giorgos_tsiftsis/32/2507_2.png) [@Giorgos\_Tsiftsis](https://discuss.elastic.co/u/Giorgos_Tsiftsis)\
**Post date:** [October 31, 2012, 3:21pm UTC](https://discuss.elastic.co/t/protect-keywords-from-filter-other-than-stem/9511/1 "2012-10-31T15:21:53Z")

</div>

hi all,  
can I protect keywords from other filters than stemmers,eg word\_delimiter?  
I want to use word\_delimiter but I dont want to break "iphone 5". Is there  
any other way?  
thanks,  
g.

--

---

<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:** [October 31, 2012, 4:20pm UTC](https://discuss.elastic.co/t/protect-keywords-from-filter-other-than-stem/9511/2 "2012-10-31T16:20:04Z")

</div>

Take a look at the Keyword Marker filter (and Stemmer Override)

> **[Elasticsearch Platform — Find real-time answers at scale](https://www.elastic.co)**
>
> Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.

> **[Elasticsearch Platform — Find real-time answers at scale](https://www.elastic.co)**
>
> Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.

Just noticed a mistake in the documentation (which I contributed). The  
example should use keywords\_path.

Ivan

On Wed, Oct 31, 2012 at 8:21 AM, Giorgos Tsiftsis \<  
[giorgos.tsiftsis@gmail.com](mailto:giorgos.tsiftsis@gmail.com)\> wrote:

> hi all,  
> can I protect keywords from other filters than stemmers,eg  
> word\_delimiter? I want to use word\_delimiter but I dont want to break  
> "iphone 5". Is there any other way?  
> thanks,  
> g.
> 
> --

--

---

<div class="post-metadata">

**Author:** ![simonw\_2](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/simonw_2/32/1130_2.png) [@simonw\_2](https://discuss.elastic.co/u/simonw_2)\
**Post date:** [November 2, 2012, 9:51pm UTC](https://discuss.elastic.co/t/protect-keywords-from-filter-other-than-stem/9511/3 "2012-11-02T21:51:39Z")

</div>

word delimiter doesn't support / respect the keyword attribute right now.  
It might be useful though. I will open a lucene issue and add it.

simon

On Wednesday, October 31, 2012 4:21:53 PM UTC+1, Giorgos Tsiftsis wrote:

> hi all,  
> can I protect keywords from other filters than stemmers,eg  
> word\_delimiter? I want to use word\_delimiter but I dont want to break  
> "iphone 5". Is there any other way?  
> thanks,  
> g.

--

---

<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:** [November 2, 2012, 11:27pm UTC](https://discuss.elastic.co/t/protect-keywords-from-filter-other-than-stem/9511/4 "2012-11-02T23:27:35Z")

</div>

Doesn't the Stemmer Override filter also use keyword attributes? Can you  
use it as a workaround?

eg: "iphone 5" =\> "iphone 5"

--  
Ivan

On Fri, Nov 2, 2012 at 2:51 PM, simonw [simon.willnauer@elasticsearch.com](mailto:simon.willnauer@elasticsearch.com)wrote:

> word delimiter doesn't support / respect the keyword attribute right now.  
> It might be useful though. I will open a lucene issue and add it.
> 
> simon
> 
> On Wednesday, October 31, 2012 4:21:53 PM UTC+1, Giorgos Tsiftsis wrote:
> 
> > hi all,  
> > can I protect keywords from other filters than stemmers,eg  
> > word\_delimiter? I want to use word\_delimiter but I dont want to break  
> > "iphone 5". Is there any other way?  
> > thanks,  
> > g.
> 
> --

--

---

<div class="post-metadata">

**Author:** ![simonw\_2](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/simonw_2/32/1130_2.png) [@simonw\_2](https://discuss.elastic.co/u/simonw_2)\
**Post date:** [November 3, 2012, 1:38pm UTC](https://discuss.elastic.co/t/protect-keywords-from-filter-other-than-stem/9511/5 "2012-11-03T13:38:03Z")

</div>

actually the simplest way is use set the "protected\_words" property of  
WordDelimiterFilter  
-\> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/index-modules/analysis/word-delimiter-tokenfilter.html)

On Wednesday, October 31, 2012 4:21:53 PM UTC+1, Giorgos Tsiftsis wrote:

> hi all,  
> can I protect keywords from other filters than stemmers,eg  
> word\_delimiter? I want to use word\_delimiter but I dont want to break  
> "iphone 5". Is there any other way?  
> thanks,  
> g.

--

---

<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 6, 2017, 3:06am UTC](https://discuss.elastic.co/t/protect-keywords-from-filter-other-than-stem/9511/6 "2017-07-06T03:06:21Z")

</div>


