I think i find out why my script is invalid. It is because my second timestamp (p.dateTimeSend or payload.dateTimeSend).
When i execute only doc['@timestamp'].value.toInstant().toEpochMilli() it works but when i execute doc['p.dateTimeSend'].value.toInstant().toEpochMilli() or doc['payload.dateTimeSend'].value.toInstant().toEpochMilli() it don´t work.
Is the Payload field a nested field? Then that might be the issue.
From what I see this should really work: doc['@timestamp'].value.toInstant().toEpochMilli() - doc['utc_time'].value.toInstant().toEpochMilli()
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.