Scripted field is ignoring fractional points

Hi,

I am using ELK GA 5.0.0. I have created a scripted field which divides values in a number field like;

return (doc['elapsed'].value/10);

but I am getting data like below;

18		1
225		22
9		0
166		16
168		16
24		24
237		23
287		28
490		49
122		12

But the expected output is like;

18		1.8
225		22.5
9		0.9
166		16.6
168		16.8
240		24.0
237		23.7
287		28.7
490		49.0
122		12.2

How can I fix this? Thanks in advance..

Try this:

return (doc['elapsed'].value/10.0);

1 Like

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