Painless script for watcher executes correctly in DevTools in Kibana, how ever.... painless script will FAIL to be executed in watcher UI as invalid JSON.
As more user adopt painless scripting it would benefit to have flexibility to use painless in places like watcher UI. A mechanism that would recognize painless and accept would be a powerful feature. A manual checkbox indicating its painless would be a good starter for painless adoption.
Are there any plans for this adoption?
Any feedback is welcome.
Thanks and appreciate.
Ed Breuer.
Describe a specific use case for the feature:
Any updates?
@pedrosk thanks for reporting this. We will treat this as an ER rather than a bug.
We should indeed add a message that scripts won't be supported with the Watcher UI as a bug
Changing into ER
Do you have any updates on this ? Writing painless on a single line is a bit ... painful :)
This is very frustrating considering that many examples written in the Watcher documentation utilize triple quotes to fence Painless code blocks, and copy-pasting those into the Edit Watcher UI results in Invalid JSON errors.
For example: https://www.elastic.co/guide/en/elasticsearch/painless/6.8/painless-watcher-transform-context.html.
I echo the sentiment that writing Painless scripts on a single line is far from 'painless'.
Please address this as a bug, using the UI to create watchers is advertised functionality but does not function. That is definitely a bug ;)
Most helpful comment
Do you have any updates on this ? Writing painless on a single line is a bit ... painful :)