# ES 5.0 - wilcard and \_all are not working anymore?

**URL:** https://discuss.elastic.co/t/es-5-0-wilcard-and--all-are-not-working-anymore/66412
**Category:** Elasticsearch
**Created:** [November 17, 2016, 2:46pm UTC](https://discuss.elastic.co/t/es-5-0-wilcard-and--all-are-not-working-anymore/66412 "2016-11-17T14:46:48Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Benjamin\_Dupre](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/benjamin_dupre/32/13245_2.png) [@Benjamin\_Dupre](https://discuss.elastic.co/u/Benjamin_Dupre)
#### Post date: [November 17, 2016, 2:46pm UTC](https://discuss.elastic.co/t/es-5-0-wilcard-and--all-are-not-working-anymore/66412/1 "2016-11-17T14:46:48Z")

</div>

```
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?

---

<div class="post-metadata">

### Author: ![igor\_k](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/igor_k/32/1157_2.png) [@igor\_k](https://discuss.elastic.co/u/igor_k)
#### Post date: [November 17, 2016, 4:06pm UTC](https://discuss.elastic.co/t/es-5-0-wilcard-and--all-are-not-working-anymore/66412/2 "2016-11-17T16:06:27Z")

</div>

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

---

<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: [December 15, 2016, 4:06pm UTC](https://discuss.elastic.co/t/es-5-0-wilcard-and--all-are-not-working-anymore/66412/3 "2016-12-15T16:06:29Z")

</div>

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