01 elasticsearch联合条件搜索问题

搜索条件如下:

 1 {
 2   "from":0,
 3   "size":5,
 4   "query":{
 5     "bool":{
 6           "must": {"match":{"message":"驴打滚"}},
 7          "must": {"term":{"type":"IT"}}
 8         }
 9       }
10 }

上面的查询的两个must字段,结果报错:

"type": "json_parse_exception",
"reason": "Duplicate field   

难道不支持  bool 中的多个 must 联合搜索吗?难道是elasticsearch 版本问题?我用的是 7.9 的

这个问题暂且记录一下,等回头有空再去查

原文地址:https://www.cnblogs.com/lpzh/p/14056281.html