'How i can take the value of a number type on kibana scripted field
I want to convert all the values of my Pie, they are in second and i want to convert them in min.
The problem is I can't take the value of my index "log_data_numerical" (it's a number type) but i can take the value of another type example: "log_data_name" (keyword type).
I wrote that:
def test = doc['log_data_name'].value;
return 2;
and when i try to take numerical like that
def test = doc['log_data_numerical'].value;
return 2;
I got
Script is invalid. View script preview for details
so please if someone has an idea it will help me a lot!
Here is some pictures:
Solution 1:[1]
You need to remove .value for numerical field as shown below.
def test = doc['log_data_numerical'];
return 2;
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Sagar Patel |
