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 ...