【发布时间】:2020-06-28 02:49:20
【问题描述】:
我是 Elastic Search 的新手,找不到有关如何将 not 或 must_not 用作弹性搜索的术语过滤器的信息。
我的查询设置如下:
{
"size":4,
"from":0,
"query":{
"bool":{
"filter":[
{
"term":{
"published":1
}
},
{
"term":{
"brand.keyword":"Honda"
}
},
{
"not": {
"term": {
"tags": "Red"
}
}
},
{
"wildcard":{
"image":"*"
}
}
]
}
}
}
但是当我在 Postman 中测试时,我得到了错误:
"type": "parsing_exception",
"reason": "no [query] registered for [not]"
有人知道我该如何解决这个问题吗?
【问题讨论】:
-
stackoverflow.com/questions/60646098/… 这也提供了更多信息
标签: elasticsearch