Suppose there are 3 records,the timestamp of first record is 10:45:00 and timestamp of second record is 10:47:00 and timestamp of next record is 10:50:00;the time difference between first and second record is of 2 minutes and time difference between second and third record is of 3 minutes. It is possible to calculate time difference between consecutive documents?
Asked
Active
Viewed 1,017 times
1
-
Are you using Logstash to ingest your documents? If yes, the following answer should help: https://stackoverflow.com/questions/37353365/calculating-time-between-events/37359000#37359000 – Val Apr 17 '18 at 04:51
-
thanks for your heads up.documents are already stored in index, using elastic query I wanna calculate difference? – vinayak futak Apr 17 '18 at 05:02
-
How many documents are we talking ? – Val Apr 17 '18 at 05:05
-
There is a stream which stores the records in elastic index..through elastic query I wanna calculate the difference between timestamps – vinayak futak Apr 17 '18 at 05:16
-
how does that stream of events go to elasticsearch? – Val Apr 17 '18 at 05:18
-
using flink and kafka I am storing events in ealsticsearch. – vinayak futak Apr 17 '18 at 05:20
-
@vinayakfutak did you get solution? – c.jack Jun 02 '20 at 15:05