Calculate two timestamps using painless

(ssh) #1

hi team!

is that possible to calculate subtract the time between two logs by id in painless script???
log example is below:

plz point out to me if possible :slight_smile:
thanks so much

(Christian Dahlqvist) #2

Scripted field run in the context of a single document, so can not act on information from different documents.

(ssh) #3

thank you @Christian_Dahlqvist

so it's still challenging flat-world to emulate real-world :cry:

(ssh) #4

Also Scripted Metric Aggregation???

(Christian Dahlqvist) #5

That may be able to do it, but as far as I recall Kibana does not yet support it. Another option would be to create an entity-centric index as described in this talk.

(ssh) #7

thank you

(Ryan Ernst) #8

Scripted metric aggregations operate just as other aggregations: one document at a time. While it might be possible to stash data between map operations, the order would be inconsistent as documents move between Lucene segments.

(system) #9

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