Skip to content

Support for overlapping "buckets" in the date histogram #66856

Closed as not planned
@tobiasstadler

Description

@tobiasstadler

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)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions