Group by hour aggregation using date-histogram on multiple days?


#1

Hi ,
I require a group by hour using the date-histogram aggregation,
On a single day the results are as expected, which are displaying unique entity of hour.
But for multiple days , there are multiple entries of hour, my requirement is to get single hour grouped on multiple days.

My current query is as below:
GET index/xxxx/_search
{
"size": 0,
"aggs": {
"hour": {
"date_histogram": {
"field": "date",
"interval": "hour",
"min_doc_count": 0,
"format": "hh"
}
}
}
}


(system) #2