I have the query below which test fields defined in two separate nested paths and the query works as expected. However, I would like to return only the inner_hits that meet both criteria. Is that doable in ES? If so, how would I go about adding it? I tried tacking it onto the outer query but that does not work. Any help would be appreciated. Thanks.

Kevin

{
 "size": 10,
           "query" : {
             "bool" : {
             "must": [
                  {"nested": {"path": "segments",
                 "query": {
                 "bool": {
                 "must": [
                  {"exists": {"field": "segments.entities.disambiguationResults"}},
                  {"regexp": {"segments.entities.type": "PERSON"}}
            ]
            }}}
              }
             ],
             "must_not": [
                  {"nested": {"path": "segments.entities.attributes",
                 "query": {
                 "bool": {
                 "must": [
                  {"exists": {"field": "segments.entities.attributes.firstName"}}
            ]
            }
            }
            }
              }
             ]
             }
           }
}

---
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB