I have a working watch script with trigger, input, condition, and action. The input section has significant logic and the condition is hard coded to true. I would like to change that.
The input section has a transform with a complex chain block. It creates new terms which are used by the scripts that live inside of the input section.
I want to duplicate all of that logic (minus the input scripts) into the condition section. However I have not seen an examples. Examples simply access simple elastic fields.
Any tips for moving custom terms into a condition block? Is my issue syntactical or is it not possible?
The following closed thread discusses the same problem that I am having. Unlike the poster, my JSON appears to be valid:
I am not sure I fully got your issue, let me try to rephrase and feel free to correct me.
You have a script running as part of a transform (in a chained input)
You now don't want to rerun the same part in the script condition
How about writing something into the payload as part of your transform, so that the condition can simply check this particular field for false or true?
If I misunderstand, please share a watch, and more details including your expectations, I think that may help a bit.
I simply needed to return the value from the last executed input script before my condition script. I failed to realize that they needed to be returned at each level of a transform chain and accessed like ctx.payload.myField. Thanks.
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.