赞
踩
GET kibana_sample_data_ecommerce/_search { "size": 1, "aggs": { "count_of_day": { "terms": { "field":"day_of_week_i" }, "aggs": { "avg_day_count": { "avg": { "field":"taxful_total_price" } } } }, "min_miv_avg_count":{ "min_bucket":{ "buckets_path":"count_of_day>avg_day_count" } }, "max_miv_avg_count":{ "max_bucket":{ "buckets_path":"count_of_day>avg_day_count" } } } }
GET kibana_sample_data_ecommerce/_search { "size": 0, "aggs": { "count_of_day": { "histogram": { "field":"day_of_week_i", "interval":2 }, "aggs": { "avg_day_count": { "avg": { "field":"taxful_total_price" } }, // parent "deirective_xxx":{ // 递归求和 "cumulative_sum":{ "buckets_path":"avg_day_count" } } } }, // sibling "min_miv_avg_count":{ "min_bucket":{ "buckets_path":"count_of_day>avg_day_count" } }, "max_miv_avg_count":{ "max_bucket":{ "buckets_path":"count_of_day>avg_day_count" } } } }
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。