Extended bounds on auto-interval date histogram

I need to be able to run a query with a set of filters and an auto-interval date histogram aggregation to retrieve a set of bins. I then need to be able to rerun that query but with additional filters, and receive exactly the same bins (albeit with different counts). The problem I have is that the new filters after the date range of the result set (and therefore the bins).

I think being able to set extended_bounds for an auto-interval aggregation would solve this, but that feature is only available on the regular date histogram.

Another potential solution would be to build a date histogram aggregation using extended bounds and the interval returned from the auto-interval histogram. The problem here is that the returned interval is incompatible with with either the calendarInterval or fixedInterval parameters of the date histogram (I can't use 5y for example).

Does anyone have any other suggestions on how I can solve this?

Thanks in advance.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.