Hello,
I am trying to use translate in the JSON INPUT to convert ItemValue 0 to Test/String Healthy
I have been trying to use painless in the JSON Input but for some reason it doesnt work.
Not too familiar with Painless so want some help here on how I can show Healthy for 0 value in the visualizer.
I am hoping I dont have to create a scripted field and do it on the visulalizer.
{
"script": {
"inline": if (doc['ItemValue'].value == 0) { return "Healthy"; } return "",
"lang": "painless"
}
}
Is there something I am missing do I need to use .getAsText in the script.
Thanks again for the help in advance