0%

ES 在聚合结果中进行过滤

ES查询中,先聚合,在聚合结果中进行过滤

1
2
3
4
5
6
7
8
9
10
11
12
{
"size": 0,
"aggs": {
"terms": {
"terms": {
"field": "mustTags",
"include": ".*总则.*",
"size": 999
}
}
}
}

有include,自然就有exclude,用法一样,支持通配符匹配(正则方式)。