Cant figure it out, need an additional field that will convert seconds into hours
I have a number field called Session-Time which i need converting into hours and displayed in another field. I have tried to create a scripted field with the following painless lines but keeps saying error in script
doc['Session-Time'].value.hours
or
doc['Session-Time'].value / 3600
the preview just says error in script and then points to the dot in .value
thanks, I did try the return at the beginning but still same error.
forgot to mention the Session-Time is now always populated with a value, so does this mean i have to add an If statement in to check if the fields is populated before performing the math
just seen in the preview more detail re: the error "a document doesn't have a value for a field..."
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.