How to use one scripted field to inside another scripted field

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?

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.

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