【发布时间】:2021-05-10 08:30:06
【问题描述】:
我有一个如下的 Elasticsearch DSL 查询
{
"query": {
"bool": {
"should": [
{
"match_phrase": {
"api": "A"
}
},
{
"match_phrase": {
"api": "B"
}
},
{
"match_phrase": {
"api": "C"
}
}
],
"minimum_should_match": 1
}
}
}
据我了解,这有点像
匹配 if (api = A or api = B or api = C)
我想在第三次检查中添加另一个检查不同字段的条件。
例如 match if (api = A or api = B or (api = C and another_field = D) ) 知道怎么做吗?
【问题讨论】:
标签: elasticsearch kibana