Hi the following query is not working anymore with ES 5.0 :
GET g_contents/_search
{
"query": {
"wildcard" : {
"_all" : {
"wildcard" : "*doc*",
"boost": 1
}
}
}
}
Are they anyway to get the same result with ES 5?
Regards,
Benjamin Dupré
dadoonet
(David Pilato)
November 28, 2016, 9:08am
2
First of all, that's a very bad idea. It's one of the worse query you can send to elasticsearch.
Similar to a full scan table you have in SQL databases.
Can you tell what is the error message you are getting?
Hi David,
Yes i know that's a terrible for performance but it's limited to a small index size.
the error is :
{
"error": {
"root_cause": [
{
"type": "query_shard_exception",
"reason": "failed to create query: {\n \"wildcard\" : {\n \"_all\" : {\n \"wildcard\" : \"Keepin*\",\n \"boost\" : 1.0\n }\n }\n}",
"index_uuid": "ROGUdIGxRlOx-7EP8N0Xfw",
"index": "g_contents"
}
],
"type": "search_phase_execution_exception",
"reason": "all shards failed",
"phase": "query",
"grouped": true,
"failed_shards": [
{
"shard": 0,
"index": "g_contents",
"node": "YmywysnqRle3qc953VBvxg",
"reason": {
"type": "query_shard_exception",
"reason": "failed to create query: {\n \"wildcard\" : {\n \"_all\" : {\n \"wildcard\" : \"Keepin*\",\n \"boost\" : 1.0\n }\n }\n}",
"index_uuid": "ROGUdIGxRlOx-7EP8N0Xfw",
"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:Keepin*"
}
}
}
],
"caused_by": {
"type": "query_shard_exception",
"reason": "failed to create query: {\n \"wildcard\" : {\n \"_all\" : {\n \"wildcard\" : \"Keepin*\",\n \"boost\" : 1.0\n }\n }\n}",
"index_uuid": "ROGUdIGxRlOx-7EP8N0Xfw",
"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:Keepin*"
}
}
},
"status": 400
}
dadoonet
(David Pilato)
November 30, 2016, 10:05am
4
I see and I can reproduce. I'm not sure if it's expected. @jpountz WDYT? Should we open an issue?
jpountz
(Adrien Grand)
November 30, 2016, 10:28am
5
That looks like a bug indeed!
dadoonet
(David Pilato)
November 30, 2016, 11:25am
6
@Benjamin_Dupre could you open an issue with all the details you sent already and link to this thread?
Thanks!
Ok , i've opened the Issue
system
(system)
Closed
December 28, 2016, 1:22pm
8
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.