August 2019
Intermediate to advanced
560 pages
13h 41m
English
The purpose of this is to find the summation value of the buckets from the aggregation in the previous stage:
"query":{"match": {"symbol":"ACWF"}},"aggs":{"monthly_change": {"date_histogram":{"field": "date","interval": "month","format": "yyyy-MM-dd"},"aggs":{"change_on_month":{"sum":{"field":"change"}}}},"overall_change":{"sum_bucket": {"buckets_path": "monthly_change>change_on_month"}}}
"monthly_change": {"buckets": [{"key_as_string": "2018-12-01","key": 1543622400000,"doc_count": ...Read now
Unlock full access