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


(Stephan) #1

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

 [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:

  "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.


(David Pilato) #2

Can you share the full error message ?


(system) #3

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