I want to use the transform section in watcher before action and wanted additional field to be added to the current payload. When I use the following painless script before the action I am getting only the epochtime in action and the original payload being lost. How to append the following epochtime to the ctx.payload so that I can access both.
Thaks for looking into this. If I take out the statement def newpayload = /[aeiou]/.matcher(ctx.payload).replaceAll(''); from the script I am able to save the watcher.
Otherwise it gives the above mentioned error in the Wather Edit page in Kibana.
Looks like it is related to enabling the script.painless.regex.enabled as the statement I am using is having the regex. Just I am wondering by default the script.painless.regex.enabled is not set may be it is throwing this error.
Let me know what you think. I don't want to add script.painless.regex.enabled: true in elasticsearch.yml and restart the master nodes. Wanted to know whether I can set this parameter dynamically.
this is not a dynamic parameter, for a very good reason, as it opens up a security issue, if someone can write complex long processing regular expressions.
Also, just checking for vowels is something you do not need a regex for, maybe you can work around that, i.e. by using String.indexOf is you just have such simple checks?
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.