Elasticsearch Hour data


(elas) #1

Hi All,

how do i get specific hour data of last 30 days from elasticsearch query.

Kindly help me. Thanks in Advacne.


(Magnus Bäck) #2

Add a range condition on your timestamp field to your query.


(elas) #3

hi magnusbaeck,

I need Every day count of that specific hour .

Ex: 2016-11-05 -- 01 hr count 25
2016-11-06-- 01 hr count 30
........................


(Magnus Bäck) #4

Oh, that's something completely different. Then you need a date histogram aggregation.


(elas) #5

Ok, Thank you,

Is there any way of doing aggregations on data histogram..

for example 2016-11-05 -- 01 hr count 25
2016-11-06-- 01 hr count 30

 So avg count of specific 01 hr is  (25+30)/2-----55/2=25.25

:hushed: is it possible


(system) #6

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