我有一个查询,用于计算每个用户的图像数量:
GET images/_search
{
"query": {
"bool": {
"must": [
{
"term": {
"appID.raw": "myApp"
}
}
]
}
},
"size": 0,
"aggs": {
"perDeviceAggregation": {
"terms": {
"field": "deviceID"
}
}
}
}
它基本上运行良好,但我想排除所有拥有少于200张图像的用户的聚合结果。如何调整上述查询以实现此目的?
谢谢。