Calculating a scripted field


I have 2 timestamps for 2 different actions, one representing the sent action for the SMS and the other representing the delivery action with identical Id for both actions (respresenting processing the same SMS).

The question is: Could anyone help on how to calculate the time difference in seconds between the 2 actions per each identical Id and showing it inline with the "Receive DLR" record.

Scripted fields are for calculating fields within a single document. Sounds like you are storing the two event times in 2 documents. If you change the way you are storing data in Elasticsearch to have the two times be stored in a single ES document, then you could create a scripted field that would calculate the difference.

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