Protect keywords from filter other than Stem


(Giorgos Tsiftsis) #1

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.

--


(Ivan Brusic) #2

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

http://www.elasticsearch.org/guide/reference/index-modules/analysis/keyword-marker-tokenfilter.html

http://www.elasticsearch.org/guide/reference/index-modules/analysis/stemmer-override-tokenfilter.html

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> 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.

--

--


(simonw-2) #3

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.

--


(Ivan Brusic) #4

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.comwrote:

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.

--

--


(simonw-2) #5

actually the simplest way is use set the "protected_words" property of
WordDelimiterFilter
-> 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.

--


(system) #6