# Query can't find hit though index and uuid is correctly selected

**URL:** <https://discuss.elastic.co/t/query-cant-find-hit-though-index-and-uuid-is-correctly-selected/103985>\
**Category:** Elasticsearch\
**Created:** [October 14, 2017, 11:14am UTC](https://discuss.elastic.co/t/query-cant-find-hit-though-index-and-uuid-is-correctly-selected/103985 "2017-10-14T11:14:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nottinhill](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nottinhill/32/23054_2.png) [@nottinhill](https://discuss.elastic.co/u/nottinhill)\
**Post date:** [October 14, 2017, 11:14am UTC](https://discuss.elastic.co/t/query-cant-find-hit-though-index-and-uuid-is-correctly-selected/103985/1 "2017-10-14T11:14:13Z")

</div>

We run on Elastic Cloud. This is the reply for the query:

```auto
 [query_shard_exception] failed to create query: {
    "bool" : {
      "must" : [
        {
          "nested" : {
            "query" : {
              "exists" : {
                "field" : "policies",
                "boost" : 1.0
              }
            },
            "path" : "policies",
            "ignore_unmapped" : false,
            "score_mode" : "avg",
            "boost" : 1.0
          }
        }
      ],
      "should" : [
        {
          "match" : {
            "displayId" : {
              "query" : "hans",
              "operator" : "OR",
              "prefix_length" : 0,
              "max_expansions" : 50,
              "fuzzy_transpositions" : true,
              "lenient" : false,
              "zero_terms_query" : "NONE",
              "boost" : 1.0
            }
          }
        },
        {
          "fuzzy" : {
            "firstName" : {
              "value" : "hans",
              "fuzziness" : "AUTO",
              "prefix_length" : 0,
              "max_expansions" : 50,
              "transpositions" : false,
              "boost" : 1.0
            }
          }
        },
        {
          "fuzzy" : {
            "lastName" : {
              "value" : "hans",
              "fuzziness" : "AUTO",
              "prefix_length" : 0,
              "max_expansions" : 50,
              "transpositions" : false,
              "boost" : 1.0
            }
          }
        },
        {
          "match" : {
            "city" : {
              "query" : "hans",
              "operator" : "OR",
              "prefix_length" : 0,
              "max_expansions" : 50,
              "fuzzy_transpositions" : true,
              "lenient" : false,
              "zero_terms_query" : "NONE",
              "boost" : 1.0
            }
          }
        },
        {
          "match" : {
            "street" : {
              "query" : "hans",
              "operator" : "OR",
              "prefix_length" : 0,
              "max_expansions" : 50,
              "fuzzy_transpositions" : true,
              "lenient" : false,
              "zero_terms_query" : "NONE",
              "boost" : 1.0
            }
          }
        },
        {
          "match" : {
            "zipCode" : {
              "query" : "hans",
              "operator" : "OR",
              "prefix_length" : 0,
              "max_expansions" : 50,
              "fuzzy_transpositions" : true,
              "lenient" : false,
              "zero_terms_query" : "NONE",
              "boost" : 1.0
            }
          }
        },
        {
          "match" : {
            "phone" : {
              "query" : "hans",
              "operator" : "OR",
              "prefix_length" : 0,
              "max_expansions" : 50,
              "fuzzy_transpositions" : true,
              "lenient" : false,
              "zero_terms_query" : "NONE",
              "boost" : 1.0
            }
          }
        },
        {
          "match" : {
            "email" : {
              "query" : "hans",
              "operator" : "OR",
              "prefix_length" : 0,
              "max_expansions" : 50,
              "fuzzy_transpositions" : true,
              "lenient" : false,
              "zero_terms_query" : "NONE",
              "boost" : 1.0
            }
          }
        },
        {
          "nested" : {
            "query" : {
              "bool" : {
                "should" : [
                  {
                    "match" : {
                      "policies.displayId" : {
                        "query" : "hans",
                        "operator" : "OR",
                        "prefix_length" : 0,
                        "max_expansions" : 50,
                        "fuzzy_transpositions" : true,
                        "lenient" : false,
                        "zero_terms_query" : "NONE",
                        "boost" : 1.0
                      }
                    }
                  }
                ],
                "disable_coord" : false,
                "adjust_pure_negative" : true,
                "boost" : 1.0
              }
            },
            "path" : "policies",
            "ignore_unmapped" : false,
            "score_mode" : "avg",
            "boost" : 500.0
          }
        }
      ],
      "disable_coord" : false,
      "adjust_pure_negative" : true,
      "minimum_should_match" : "1",
      "boost" : 1.0
    }
  }, with { index_uuid="kUQRXRqiS6qQt1Q1rW93Tg" & index="MYINDEX123" }

```

Index exists:

```auto
  "index": {
    "creation_date": "1507978267355",
    "number_of_shards": "5",
    "number_of_replicas": "1",
    "uuid": "kUQRXRqiS6qQt1Q1rW93Tg",
    "version": {
      "created": "5060399"
    },
    "provided_name": "MYINDEX123"
  }

```

This happens after manual wipe of elastic index and no reboot of your APIs. Our APIs do another clean of Index on reboot, maybe its a cashing problem? I am pretty new to Elastic, bare in mind.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [October 14, 2017, 11:30am UTC](https://discuss.elastic.co/t/query-cant-find-hit-though-index-and-uuid-is-correctly-selected/103985/2 "2017-10-14T11:30:55Z")

</div>

Can you share the full error message ?

---

<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:** [November 11, 2017, 11:31am UTC](https://discuss.elastic.co/t/query-cant-find-hit-though-index-and-uuid-is-correctly-selected/103985/3 "2017-11-11T11:31:16Z")

</div>

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