有没有办法为terms
聚合添加过滤器,所以我只得到以某些字符串开头的过滤器?
我从这里开始:
{
"query": {
"match_all": {}
},
"aggs": {
"address": {
"terms": {
"field": "address"
}
}
}
}
答案 0 :(得分:1)
使用include
or exclude
parameters:
{
"query": {
"match_all": {}
},
"aggs": {
"address": {
"terms": {
"field": "address",
"include": "Main.*" <-- add this
}
}
}
}