Painless scripting - how to compare two different fields present in two different documents of an index

Hi , I want to compare field 'start_time' present in document 'A' and field 'end_time' present document 'B' and get the result as new field in the document using painless scripting. I am using scripted fields in kibana to achieve this. Did anyone tried this before?

I am using elasticsearch 5.6.4

Scripting allows generating dynamic values for a single document. There is no way to run a script that operates on multiple documents at the same time.

1 Like

@rjernst what would be the best way to do it? appreciate your quick response.

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