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


(krishna_gaddipati) #1

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


(Ryan Ernst) #2

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.


(krishna_gaddipati) #3

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


(system) #4

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