Histogram Aggregation: With minimum doc count and extended bounds

Hi There,
I'm running ES 2.3.3 and have a question regarding Date Histograms with min doc count and extended bounds. I would like to return all buckets within a given date range (e.g. one month) including buckets with no values with a value of 0. (for ease of graphing)

The following query works correctly, however it does not filter the results to within the date range of 2016-08-01 and 2016-08-02. My understanding from reading the docs is the filter should restrict the result set to be within the bounds of the range queries. I have tried with both a query and a date range filter. The buckets for the past year keep coming through, instead of for just the date range specified.


Also, if I remove the extended bounds I only receive the buckets with non-zero values which is also not what I am looking for: min doc count=0 buckets should also be included.

The API is buggy. "For filtering buckets, one should nest the histogram aggregation under a range filter aggregation with the appropriate from/to settings." This does not not work as documented.

Would you mind filing a Github issue for that in case you haven't already done so?