August 2019
Intermediate to advanced
560 pages
13h 41m
English
The purpose is to calculate the percentiles for the buckets' aggregation values in the previous stage:
"query":{"match": {"symbol":"ACWF"}},"aggs":{"weekly_change": {"date_histogram":{"field": "date","interval": week","format": "yyyy-MM-dd"},"aggs":{"change_on_week":{"sum":{"field":"change"}}}},"percentile_weekly_change":{"percentiles_bucket": {"buckets_path": "weekly_change>change_on_week"}}}
"weekly_change": {"buckets": [{"key_as_string": ...Read now
Unlock full access