Multiple documents same id find difference

HI,

Actually have sample data like

id,date,value
1,12-03-2018:12:12:234,3
1,12-03-2018:12:13:234,4
2,12-03-2018:12:18:264,2
2,12-03-2018:12:20:234,9

Want to have date difference and value difference between the docs is it possible?

output:
1,1,1
2,2,7

I don't think so.

You should better solve that problem at index time IMO. Like getting the old document if any then updating it (use the document id).

If the document existed, then compute a duration.

But all that needs to happen on the application side.

If you are using logstash there is a nice plugin for that: aggregate

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