Skip to content

Range support for Auto-interval Date Histogram #45299

@not-napoleon

Description

@not-napoleon

This is a discussion issue for how and if we should add Range Field support to the Auto-interval Date Histogram aggregation. There are some edge cases with auto bucketing that don't come up in fixed width buckets.

Consider the case of many narrow (sub-hour) ranges and one wide (many days) interval. If we look at a single day and ask for ~20 buckets, we might expect to see one or three hour wide buckets. But if the wide range intersects the queried date, we might instead end up with day buckets.

We discussed this on 2019-08-07 and had a few thoughts on how to handle this:

  • Outlier detection could remove wide ranges when calculating the interval, but factor them in when counting documents. This could happen in the reduce phase, maybe?
  • We could achieve a similar effect by limiting the aggregation to a contains query, which would exclude ranges spanning beyond the queried time.

Leaving this open for further discussion.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions