I have two timestamp fields in my index and I want to calculate the time difference between two fields using scripted fields, and after that, I want to use fields in the visualization. is this possible?
Hi @lchen, Welcome
Yes, this is possible: you can use multiple fields from a single document. Please note, that scripted fields are deprecated and runtime fields should be used instead.
You can find some of examples of runtime fields here: Getting started with runtime fields, Elastic’s implementation of schema on read | Elastic Blog
i am using an old version so still have script fields instead of run time fields. would this still be possible?
Yes, here you can find some examples: Using Painless in Kibana scripted fields | Elastic Blog
I think you'd need something similar to
Combine two string values example.