1

I have Version: 5.4.1 kibana in my PC, now I am trying to re-write the watchers from groovy language to painless. so my question here is if this version of kibana 5.4.1 support painless language or not?

I ask the above bcos I see painless documentation only from 5.5

ganga
  • 402
  • 4
  • 5

1 Answers1

0

Painless was available in Elasticsearch starting 5.0. see https://www.elastic.co/guide/en/elasticsearch/reference/5.0/modules-scripting-painless-syntax.html

In kibana, I can track it to almost the same version. A kibana blog post states that you can use it in 5.1.1 : https://www.elastic.co/blog/using-painless-kibana-scripted-fields

So I guess that you should be fine with 5.4.1

  • Thanks for that info @ziv, also could you please help in providing any insights or any tips in migrating my groovy scripts to painless scripts – ganga Aug 07 '19 at 14:05
  • Welcome. you would need to understand what your script is doing, and re-write it line by line, hoping that everything you have in your groovy script is supported in painless. I don't know of any other method. – Opster Elasticsearch Expert Aug 07 '19 at 14:21
  • thanks for that info @ziv, also do you know where to test the painless scripts after we write. I mean is there any IDE like Eclipse or some other – ganga Aug 07 '19 at 20:17
  • 1
    I'm not aware of any emulator/IDE that execute painless, except of ES.. you might want to run and check agains a cluster if no other option available – Opster Elasticsearch Expert Aug 08 '19 at 06:59
  • what do you mean by check against a cluster – ganga Aug 09 '19 at 15:45
  • you can run painless scripts on Elasticsearch cluster using the _execute API. see here: https://www.elastic.co/guide/en/elasticsearch/painless/master/painless-execute-api.html – Opster Elasticsearch Expert Aug 11 '19 at 06:22