Just stumbled across this post as I'm trying to do something very similar. I have used a date histogram with a script in order to to get a per second hit count for log entries. There is one bucket per second for 24 hours, 86400 buckets! What I want to do now is produce a reduced histogram from this parent histogram, where each bucket represents 5 minutes and will contain the average or max value of doc_count from corresponding the parent buckets. Is there any way to achieve this yet?