Kibana Scripted field : Not able to parse the String to Double/Int

I am getting one weired error.

I have field called no_of_scanned value which is String in Kibana

The data look like 1234 4567 etc

I cant do some aggregation so trying to convert this into int/double . SO I created a scripted field and select the type as number .

Here is my painless script :

return Double.parseDouble(doc['no_of_scanned'].value)

I am expecting an double to be returned .

But the result in console is looking like below.

  _id:"some randomid of elastic",
   zzz : [1898]


zzz is my scripted field. 

Please let me know why zzz value is surrounded by . I want just number to be returned.

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