I'm trying to create a new field (of type double) that is the result of a calculation of another field, that is of type double too.
I'm using filebeat to send the data to an ingest pipeline, and the ingest pipeline has a script processor to do this calculation, as below:
The field ctx.radius.log.Tempo_Conexao and ctx.radius.log.OrigSessionTime are both of type double, but the script processor is recognizing the field ctx.radius.log.OrigSessionTime as string, so i'm getting the error below:
Cannot apply [/] operation to types [java.lang.String] and [java.lang.Double].
Is there any way to cast the field ctx.radius.log.OrigSessionTime to double?
Also, if you have to use it in a ingest pipeline, I'd first look for the presence of all the needed fields before applying anything to them, in order to avoid breaking the script.
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.