0
我想计算Elasticsearch中的项聚合器的计数之间的pourcentile。使用Elasticsearch中的子项聚合器的数据的脚本
我的查询:
{
"query" : {
"match_all" : {}
},
"size" : 0,
"aggs": {
"eventName" : {
"terms" : { "field" : "json.eventName" }
}
}
}
结果聚合:
"aggregations": {
"eventName": {
"doc_count_error_upper_bound": 0,
"buckets": [
{
"key": "term1",
"doc_count": 30235
},
{
"key": "term2",
"doc_count": 30216
},
{
"key": "term3",
"doc_count": 22177
},
{
"key": "term4",
"doc_count": 17173
}
]
}
}
我想 “字词1” 和 “term4” 之间的这一指标为例:56%
不知道我的问题? – 2014-11-24 08:31:04