How to use the stop words in search


(narinder.izap) #1

Hi,
I am using standard, simple or keyword analyzers depending upon the
search types. In case of standard or simple analyzers, when I am searching
some keywords which are the stop words(e.g a, be, was, on etc), the search
stops, as per expected behave. Now I want to use the same analyzers but
these stop words should also be searchable as I am sure the fields being
search will never contain these kind of grammar words.

       Can anyone please help me ignoring the stop words being filtered 

out? I need to search them too.

--


(simonw-2) #2

you simply need to build your own analyzer
(http://www.elasticsearch.org/guide/reference/index-modules/analysis/custom-analyzer.html)
something like this:

        standard_no_stop :
            type : custom
            tokenizer : standard
            filter : [standard, lowercase_filter]

simple analyzer doesn't do stopwords no?

hope that helps

simon
On Saturday, November 3, 2012 6:27:15 AM UTC+1, Narinder Kaur wrote:

Hi,
I am using standard, simple or keyword analyzers depending upon the
search types. In case of standard or simple analyzers, when I am searching
some keywords which are the stop words(e.g a, be, was, on etc), the search
stops, as per expected behave. Now I want to use the same analyzers but
these stop words should also be searchable as I am sure the fields being
search will never contain these kind of grammar words.

       Can anyone please help me ignoring the stop words being 

filtered out? I need to search them too.

--


(system) #3