【发布时间】:2020-06-24 06:08:46
【问题描述】:
我很高兴使用 kibana 查询通过如下过滤来获取数据。
Not why.keyword : "" and target.keyword :"Crystal Sunset Luxury Resort & Spa" and why.keyword : "Kum Plaj,Antalya" and rate >= 0.6
但我决定在 elasticsearch 查询中使用此查询,它会引发错误。如何将上述 kibana 查询转换为简单的 elasticsearch 查询?
GET /hotelsimilarity-*/_search
{
"query": {
"query_string": {
"query": "Not why.keyword : "" and target.keyword :"Crystal Sunset Luxury Resort & Spa" and why.keyword : "Kum Plaj,Antalya" and rate >= 0.6"
}
}
}
错误:
{
"error": {
"root_cause": [
{
"type": "json_parse_exception",
"reason": "Unexpected character ('\"' (code 34)): was expecting comma to separate Object entries\n at [Source: org.elasticsearch.transport.netty4.ByteBufStreamInput@23dd4c9a; line: 4, column: 43]"
}
],
"type": "json_parse_exception",
"reason": "Unexpected character ('\"' (code 34)): was expecting comma to separate Object entries\n at [Source: org.elasticsearch.transport.netty4.ByteBufStreamInput@23dd4c9a; line: 4, column: 43]"
},
"status": 500
}
【问题讨论】:
标签: elasticsearch kibana devops elk