我有一个ElasticSearch 7.7查询,带有几个过滤器(我不想计入分数的条件),看起来像这样:
{
"from": 0,
"size": 100,
"query": {
"bool": {
"must": {
"match_all": {}
},
"filter": [
{
"term": {
"type": 4
}
},
{
"term": {
"gender": "female"
}
}
]
}
}
}
字符串
我想在两个性别过滤器中添加一个OR子句,以便过滤所有带有type=4
AND(gender=female
OR gender=unisex
)的文档。这可能吗?
1条答案
按热度按时间bogh5gae1#
可以使用
should
子句字符串