0
我希望做的是排除结果是不符合条件或anothor条件过滤搜索:elasticsearch:做应该到过滤
我想一个应该做的到的过滤器,但它失败:
POST /my_index/_search
{
"query": {
"bool": {
"filter": [
{
"should": [
{
"match": {
"type1_title": "searched match"
}
},
{
"match": {
"type2_title": "searched match"
}
}
]
}
]
}
}
}
它引发的错误:
"error": {
"root_cause": [
{
"type": "parsing_exception",
"reason": "[should] query malformed, no start_object after query name",
"line": 9,
"col": 21
}
],
"type": "parsing_exception",
"reason": "[should] query malformed, no start_object after query name",
"line": 9,
"col": 21
},
"status": 400
}
你知道,如果我们可以做一个或一个过滤器?
谢谢你,你是正确的,但我给了一个简单的例子。我真的想做一个或在一个过滤器。你知道它是否是一个功能吗? –
'应该是一个OR过滤器 – Val
我已经更新了我的答案,如果你真的想保留过滤器 – Val