【发布时间】:2017-01-30 19:36:17
【问题描述】:
我正在尝试在 Kibana 的 elasticsearch 查询中匹配多个通配符查询。我不太明白。
基本上我想要任何具有属性 type="erreur" 的文档
我想排除与 descr_courte 字段中的字符串“An established*”或“java.lang.*”匹配的所有文档
{
"query": {
"bool": {
"must": {
"term": {
"type": "erreur"
}
},
"must_not": {
"wildcard": {
"descr_courte": ["An established*", "java.lang.*"]
}
}
}
}
}
如果我输入一个通配符查询,它就可以正常工作
{
"query": {
"bool": {
"must": {
"term": {
"type": "erreur"
}
},
"must_not": {
"wildcard": {
"descr_courte":
"An established*"
}
}
}
}
}
我得到的错误:
错误:对 Elasticsearch 的请求失败:{"error":{"root_cause":[{"type":"illegal_state_exception","reason":"Can't get text on a START_ARRAY at 1:454"}] ,"type":"search_phase_execution_exception","reason":"所有分片 有什么想法吗?
【问题讨论】:
-
那么,什么不起作用?
-
你试过那个查询吗?你在你的应用上测试过吗?
-
你用的是什么版本?
标签: elasticsearch