# Bool search with MUST for nested, nested string

**URL:** <https://discuss.elastic.co/t/bool-search-with-must-for-nested-nested-string/119532>\
**Category:** Elasticsearch\
**Created:** [February 12, 2018, 6:28pm UTC](https://discuss.elastic.co/t/bool-search-with-must-for-nested-nested-string/119532 "2018-02-12T18:28:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![YeeP](https://avatars.discourse-cdn.com/v4/letter/y/41988e/32.png) [@YeeP](https://discuss.elastic.co/u/YeeP)\
**Post date:** [February 12, 2018, 6:28pm UTC](https://discuss.elastic.co/t/bool-search-with-must-for-nested-nested-string/119532/1 "2018-02-12T18:28:03Z")

</div>

Here is a example of what I am trying to run, the last query is the one in question

```auto
GET sev_incidents/_search
{
    "query": {
      "bool": {
        "must": [
          {
            "query_string": {
              "query": "** AND open:false",
              "fields": [
                "number"
              ]
            }
          },
          {
            "query_string": {
              "query": "*Amazon*",
              "fields": [
                "company"
              ]
            }
          },
          {
            "nested": {
              "path": "update.sites",
              "query": {
                "query_string": {
                  "query": "\"ALBANY,GA\" AND \"AFNI (Bloomington IL)\"",
                  "fields": [
                    "update.sites.name"
                  ]
                }
              }
            }
          }
        ]
      }
    }
}

```

With the addition of the third query, this search fails. The data structure for update.sites is:

```auto
 [
                {
                  "name": "ALBUQUERQUE",
                  "sys_id": "d6c04e140f92b500d55ae498b1050e25"
                }
 ]

```

We need to be able to search for multiple sites that all "must" be part of the search. Any help would this would be much appreciated.

Thank you,  
Ryan

---

<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:** [March 12, 2018, 6:28pm UTC](https://discuss.elastic.co/t/bool-search-with-must-for-nested-nested-string/119532/2 "2018-03-12T18:28:14Z")

</div>

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