# Help understanding boolean should query results

**URL:** <https://discuss.elastic.co/t/help-understanding-boolean-should-query-results/350495>\
**Category:** Elasticsearch\
**Created:** [January 5, 2024, 10:46pm UTC](https://discuss.elastic.co/t/help-understanding-boolean-should-query-results/350495 "2024-01-05T22:46:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![allan.silverstein](https://avatars.discourse-cdn.com/v4/letter/a/e9c0ed/32.png) [@allan.silverstein](https://discuss.elastic.co/u/allan.silverstein)\
**Post date:** [January 5, 2024, 10:46pm UTC](https://discuss.elastic.co/t/help-understanding-boolean-should-query-results/350495/1 "2024-01-05T22:46:45Z")

</div>

Hello, I'm not understanding why the following query does not show any documents hits for the "support\_files.bgp\_evpn\_routes" field. It does show hits for the first match\_phrase (name a). As a troubleshooting test, I completely removed the first "match\_phrase" so only the second match\_phrase is present(i.e. name b). This then results in document hits. I also performed queries for each of the match phrases independently without a boolean. They both show hits. One thing to note is the documents that "would" match query name\_a do not have a field "support\_files.bgp\_evpn\_routes" and the documents that would match query name\_b do not have a "message" field. Would that cause a problem?  
Thank you for any assistance!

```auto
      "query": {
        "bool": {
          "should": [
            { "match_phrase": { "message": { "query": "Attaching eBPF", "_name": "a" } } },
            { "match_phrase": { "support_files.bgp_evpn_routes": { "query": "routing", "_name": "b" } } }
          ],
          "minimum_should_match": 1
        }

```

---

<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:** [February 2, 2024, 10:46pm UTC](https://discuss.elastic.co/t/help-understanding-boolean-should-query-results/350495/2 "2024-02-02T22:46:45Z")

</div>

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