I would like to recall on this Date_histogram buckets not as expected, i have te same requirement
I have the same issue, when doing the date histogram, i use different interval values lets say 30d, 7d, what happens is that response doesn't include the last 30 days as they seem to not fit totally in that bucket, how to achieve that buckets include the last 30 and backwards?