How to use one scripted field to inside another scripted field


(Vinay Garg) #1

I have created two scripted field 'oldDate'
oldDate = doc['Date'].value.

and 'newDate'
newDate = doc['oldDate'].

How can i use oldDate scripted field in second scripted field?


(Felix Stürmer) #2

Hi @vinay_garg,

as far as I know the scripted fields only have access to the document and the document _source. That means that your seconds script would have to also access doc['date'].value.


(system) #3

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