Apply Elasticsearch script in grafana to visualize the results

Hello guys!

I have easy script written in Kibana console which just multiplies a number of a document field stored in ES.

It looks like this:

GET my_index/_search
{
  "script_fields": {
"doubled_field": {
  "script": {
    "lang": "expression",
    "source": "doc['duration'] * multiplier",
    "params": {
      "multiplier": 2
    }
  }
}
  }
}

So result shows field duration multiplied by two.

Is it posible to use the same kind of script in Grafana or somehow visualize the result?

Thank you for any help :slight_smile: