ES 5.0 - wilcard and _all are not working anymore?


(Benjamin Dupré) #1
GET g_contents/_search
{
  "query": {
              "wildcard" : {
                "_all" : {
                  "wildcard" : "*doc*",
                  "boost": 1
                }
              }
            }
      }

This query was woking fine with ES 2.x and since we migrated to ES 5.0 we got this error :

{
  "error": {
    "root_cause": [
      {
        "type": "query_shard_exception",
        "reason": "failed to create query: {\n  \"wildcard\" : {\n    \"_all\" : {\n      \"wildcard\" : \"*doc*\",\n      \"boost\" : 1.0\n    }\n  }\n}",
        "index_uuid": "_mJW50cwRLe4TNDl1Ms2Sg",
        "index": "g_contents"
      }
    ],
    "type": "search_phase_execution_exception",
    "reason": "all shards failed",
    "phase": "query",
    "grouped": true,
    "failed_shards": [
      {
        "shard": 0,
        "index": "g_contents",
        "node": "TyJPeRaATiK4tXWWKSkL9A",
        "reason": {
          "type": "query_shard_exception",
          "reason": "failed to create query: {\n  \"wildcard\" : {\n    \"_all\" : {\n      \"wildcard\" : \"*doc*\",\n      \"boost\" : 1.0\n    }\n  }\n}",
          "index_uuid": "_mJW50cwRLe4TNDl1Ms2Sg",
          "index": "g_contents",
          "caused_by": {
            "type": "illegal_argument_exception",
            "reason": "Cannot extract a term from a query of type class org.elasticsearch.common.lucene.all.AllTermQuery: _all:*doc*"
          }
        }
      }
    ],
    "caused_by": {
      "type": "query_shard_exception",
      "reason": "failed to create query: {\n  \"wildcard\" : {\n    \"_all\" : {\n      \"wildcard\" : \"*doc*\",\n      \"boost\" : 1.0\n    }\n  }\n}",
      "index_uuid": "_mJW50cwRLe4TNDl1Ms2Sg",
      "index": "g_contents",
      "caused_by": {
        "type": "illegal_argument_exception",
        "reason": "Cannot extract a term from a query of type class org.elasticsearch.common.lucene.all.AllTermQuery: _all:*doc*"
      }
    }
  },
  "status": 400
}

We cannot figure out from where the issue is coming? any clue?


(Igor Kupczyński) #2

Hi @Benjamin_Dupre,

I think this question may get a better answer on the elasticsearch category as it seems not cloud specific. I moved the question.

Thanks,
Igor


(system) #3

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