Yes...the link that you provided didn't help.
Ok, I discovered the problem. Your syntax was wrong. You can't use a String in a Scripted Field, only numbers! I found this link that explains it:
Hi Darpan,
You can use Groovy scripts within Kibana, but you have to use some of its advanced features to effectively make it do what you want. However, the way to do it depends on where the script needs to go. Can you write the query that you want to be processed?
{
"query" : {
"filtered" : {
"script" : {
"script" : "your-script-name"
}
}
}
}
If that's the case, then you can actually supply the inner-query portion in the Kibana search box:
[image]
{ "filtere…
It's not simple to set up but the steps are there that explain how to do maths on a metric field.
Many thanks.