August 2019
Intermediate to advanced
560 pages
13h 41m
English
The purpose of this is to compute a series of value differences between a time lag of the buckets from the aggregation in the previous stage. The parameter lag is the prior nth bucket used for subtraction from the current bucket:
"query":{"match": {"symbol":"ACWF"}},"aggs":{"serial_diff_weekly_avg_change": {"date_histogram":{"field": "date","interval": "week","format": "yyyy-MM-dd"},"aggs":{"weekly_avg_change":{"avg":{"field":"change"}},"weekly_avg_serial_diff": {"serial_diff": {"buckets_path":"weekly_avg_change","lag":1}}}}} ...Read now
Unlock full access