即时搜索以下查询中的错误,因为它不会带来任何结果。我希望它像术语过滤器一样,并在国家/设备字段中查找确切的值
GET idx/type/_search
{
"query": {
"filtered": {
"filter": {
"and": {
"filters": [
{
"query": {
"query_string": {
"query": "country:\"united kingdom\" AND device:\"desktop\""
}
}
}
]
}
}
}
}
}
具体来说,这有效:
"query": {
"query_string": {
"query": "\"united kingdom\""
}
}
但这不起作用:
"query": {
"query_string": {
"query": "country:\"united kingdom\""
}
}
映射:
"country": {
"type": "string",
"index": "not_analyzed",
"doc_values": true
},