ElasticSearch Filter Aggregations

原文链接: http://www.cnblogs.com/liuyuhua/p/5260709.html

类似于sql语句中where子句的作用

   

{

"query": {

"match_all": {}

},

"aggs": {

"aggname": {

"filter": {

"range": {

"time-taken": {

"gt": 200

}

}

},

"aggs": {

"avg_size": {

"avg": {

"field": "time-taken"

}

}

}

}

},

"size": 20

}

   

   

转载于:https://www.cnblogs.com/liuyuhua/p/5260709.html

猜你喜欢

转载自blog.csdn.net/weixin_30210651/article/details/94788179