"sum_other_doc_count": 0, //除了返回 bucket 的 terms 以外,其它 terms 的文档总数 "buckets" : [ { "key" : "electronic", //每个聚合词项 "doc_count" : 6 //该词项下面对应的文档个数 }, { "key" : "rock", "doc_count" : 3 }, { "key" : "jazz"
"sum_other_doc_count": 0, "buckets": [ { "key": "books", "doc_count": 6 }, { "key": "clothes", "doc_count": 3 }, { "key": "shoes", "doc_count": 2 } ] } } } 返回结果中的buckets列表默认会按照doc_count进行排序,并返回前10项。更多参数请参考Terms aggregation. 2. Date...
"sum_other_doc_count" : 0, "buckets" : [ { "key" : "large", "doc_count" : 1 } ] } }, "colors" : { "doc_count_error_upper_bound" : 0, "sum_other_doc_count" : 0, "buckets" : [ { "key" : "blue", "doc_count" : 1 }, { "key" : "red", "doc_count" : 1 ...
{ "aggregations": { "brands": { "doc_count_error_upper_bound": 0, "sum_other_doc_count": 0, "buckets": [ { "key": "Levi's", "doc_count": 3 } ] } } } 现在,让我们看一下其他示例,展示 kNN 查询的灵活性。 具体来说,它如何能够灵活地与其他查询结合起来。 kNN 可以是boolean查询...
"per_make_sum" : { ---第二层桶的名称 "doc_count_error_upper_bound" : 0, "sum_other_doc_count" : 0, "buckets" : [ ---第二层聚合结果 { "key" : "bmw", ---聚合字段的值,这里是汽车品牌 "doc_count" : 1, ---桶内的文档数量 ...
"sum_other_doc_count": 0, "buckets": [ { "key": "[63336]#split#[117.136.89.93]", "doc_count": 3, "orderNumber_count": { "value": 3 } }, { "key": "[63336]#split#[1.180.71.158]", "doc_count": 2, "orderNumber_count": { ...
sum_other_doc_count为buckets结果的补集文档个数,随聚合参数size变化 buckets为聚合结果,key为聚合时的field,doc_count为聚合个数 参数介绍 size 默认为根据doc_count排序由大到小的10条数据,如果需要一次返回更多的聚合结果,可以调整size大小,但是这个结果不能用于分页,没有页数的限制,只能返回条数大小 ...
Sum求和(过滤查询中的结果查询出帽子的价格的总和) Percentile计算从聚合文档中提取的数值的一个或多个百分位数; 解释下下面这个例子,网站响应时间做的一个分析,单位是毫秒,5毫秒响应占总响应时间的1%; Cardinality计算不同值的近似计数,类似数据库的distinct count ...
"doc_count" : 2, "color_agg" : { "doc_count_error_upper_bound" : 0, "sum_other_doc_count" : 0, "buckets" : [ ---buckets内每个元素是一个子桶,这些数据已按照make_color_sales_rank的值降序排序 { "key" : "green", "doc_count" : 1, ...
"doc_count_error_upper_bound" : 0, "sum_other_doc_count" : 0, "buckets" : [ { "key" : "toyota", "doc_count" : 2, "stat" : { "count" : 2, "min" : 12000.0, "max" : 15000.0, "avg" : 13500.0, ---排序字段 "sum" : 27000.0, ...