How to ignore stop words


(Kallem Prathyusha) #1

Hi,I am using NEST 1.7.1 and ES 1.7.5
I have this Author Name field against each document and mapping for this field looks like this:
"authorName": { "type": "string", "fields": { "exact": { "type": "string", "index": "not_analyzed" }, "exact_lowercase": { "type": "string", "analyzer": "text_exact_no_splitting" } } }
Analyzer:
"text_exact_no_splitting":{ "type":"custom", "tokenizer":"keyword", "filter":"lowercase" }
And I have boost value for this field along with other fields:
qs.OnFields(new[] { "title", "title.stemmed", "summaryWithoutHtml^0.75", "summaryWithoutHtml.stemmed^0.75", "bodyWithoutHtml^0.5", "bodyWithoutHtml.stemmed^0.5", "authorName^0.1" });

When i search for any stop word,all the above fields ignore the stop word except authorName as i am not using type:english.I don't want to change the analyzer type of that field because authorNames might contain stop words and i don't want to ignore them but when i search for a stop word against all the above fields together ,stop word should be ignored and shouldn't return any results. Can anyone please help?


(system) #2