Elasticsearch. Remove stopwords from query - good or bad idea?

Viewed 285

We remove stopwords when indexing but find that "x and y" returns different results to "x y".

So, is removing stopwords from query terms a good or bad idea? When we tried we found that "+x" was reduced to "x" by the "stop" analyzer...hence, makes me think we are on the wrong track.

2 Answers

There's an article you should read: https://www.elastic.co/blog/stop-stopping-stop-words-a-look-at-common-terms-query

It really depends on what your domain is and what kind of queries you'll be executing.

I no longer remove stop words because they contain a lot of semantic meaning and removing them might bring back undesired results. Instead, it's better to build your own list of stop words that are applicable to your domain.

Related