Elasticsearch remove stopwords from storing in index and aggregation


#1

In latest version 5.5, the string type has been changed to text/keyword. I enabled the stopwords for the field message_analyzed and it is working for search. Means if i search for the, it is not returning but if i use below for aggregation

"field": "message_analyzed.keyword"

getting the stopwords too in aggregation bucket.
The(1), man (1), travelling(1)

Any suggestion are welcome.

I have a big description field which i am planning to split by space and index the values as multi valued field for aggregation. Is there any way to remove the stop words from not getting indexed too which will help me both memory and functionality wise.

Example:

message_analyzed: "The great business man was travelling to"

To be indexed:

message_analyzed: ["great", "business", "man", "travelling"]

Remove: The, was , to

I need to get aggregation as great(1), business(1), man (1), travelling(1)

Thanks


(system) #2

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