# Query string boolean operators vs. stop words

**URL:** <https://discuss.elastic.co/t/query-string-boolean-operators-vs-stop-words/276535>\
**Category:** Elasticsearch\
**Created:** [June 21, 2021, 12:32pm UTC](https://discuss.elastic.co/t/query-string-boolean-operators-vs-stop-words/276535 "2021-06-21T12:32:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![zsonglorman](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zsonglorman/32/90601_2.png) [@zsonglorman](https://discuss.elastic.co/u/zsonglorman)\
**Post date:** [June 21, 2021, 12:32pm UTC](https://discuss.elastic.co/t/query-string-boolean-operators-vs-stop-words/276535/1 "2021-06-21T12:32:18Z")

</div>

Hello,

I'm using a query string query with boolean operators as stated in the [docs](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html#_boolean_operators), like this: _((quick AND fox) OR (brown AND fox) OR fox) AND NOT news_

This works all right, but I noticed that stop words are not ignored in these type of queries. So, if my query is _(the quick fox)_, then the stop word _the_ is correctly ignored by Elasticsearch. However if the query contains boolean operators, like _(the AND quick AND fox)_, then the stop word _the_ is NOT ignored by Elasticsearch. How can I keep the functionalities of these boolean operators, while still ignoring stop words in the query? (Removing stop words on the client side is not an option, as they are handled by Elasticsearch.)

Thank you in advance!

---

<div class="post-metadata">

**Author:** ![zsonglorman](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zsonglorman/32/90601_2.png) [@zsonglorman](https://discuss.elastic.co/u/zsonglorman)\
**Post date:** [July 12, 2021, 2:34pm UTC](https://discuss.elastic.co/t/query-string-boolean-operators-vs-stop-words/276535/2 "2021-07-12T14:34:15Z")

</div>

Anyone has any ideas?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [August 9, 2021, 2:34pm UTC](https://discuss.elastic.co/t/query-string-boolean-operators-vs-stop-words/276535/3 "2021-08-09T14:34:31Z")

</div>

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