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?