Closed as not planned
Description
I would like create overlapping "buckets" in the date histogram aggregation(or a new aggregation). E.g I would like to create buckets for every hour of the last 12 hours, but each bucket should also contain the documents 3 hours prior the bucket.
bucket 1 should contain everything between now and now-4h,
bucket 2 should contain everything between now-1h and now-5h,
bucket 3 should contain everything between now-2h and now-6h,
...
It should then be possible to calculate a metric for each bucket. E.g. I should be able to calculate the average of the last 3 hours for each hour.
This is similar to what one can do with Prometheus range queries (https://prometheus.io/docs/prometheus/latest/querying/api/#range-queries)