ES aggregation with date histogram

Need to filter books created by hours, The below query will return every days with hourly result.

But we need group by hours results only.So that we can able to identify peak hours.

curl http://localhost:9002/books/_search -d '{
"aggs" : {
"avg books created by hour" : { "date_histogram" : { "field" : "created_at", "interval" : "hour"} }
}
}'

This query will return each & every day aggregation, But we need only 24 results .. Please let me know if possible ...

Try regular histogram aggs

While using regular histogram, we can't able to specify hourly interval..

I think can't use regular histogram, For this scenario.

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