SOLVED: [query_shard_exception failed to create query with index

I have just started getting a strange failed to create query error, I am running the query though elasticsearch.js. When is tried searching across multiple indexes ['gin','wine','whisky','beer'] it worked as soon as I limit the index to wine I get this follow error

[query_shard_exception] failed to create query: {
  "bool" : {
    "should" : [
      {
        "multi_match" : {
          "query" : "Bodega",
          "fields" : [
            "name^2.0",
            "producer^3.0",
            "searchterm^1.0"
          ],
          "type" : "best_fields",
          "operator" : "OR",
          "slop" : 0,
          "fuzziness" : "1",
          "prefix_length" : 0,
          "max_expansions" : 50,
          "zero_terms_query" : "NONE",
          "auto_generate_synonyms_phrase_query" : true,
          "fuzzy_transpositions" : true,
          "boost" : 1.0
        }
      },
      {
        "multi_match" : {
          "query" : "Bodega",
          "fields" : [
            "name^2.0",
            "producer^3.0",
            "searchterm^1.0"
          ],
          "type" : "phrase_prefix",
          "operator" : "OR",
          "slop" : 0,
          "prefix_length" : 0,
          "max_expansions" : 50,
          "zero_terms_query" : "NONE",
          "auto_generate_synonyms_phrase_query" : true,
          "fuzzy_transpositions" : true,
          "boost" : 1.0
        }
      }
    ],
    "adjust_pure_negative" : true,
    "boost" : 1.0
  }
}, with { index_uuid="ASBNyiVeQ1Kcw9elbaWwCg" & index="wine" }

SOLVED: When running the query through postman I get better error messages. Forgot that I had set the searchterm to be a keyword.

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