I am trying to add conditions in a watcher.
If the value of the ctx.payload.value is less than 100, it should print a particular message "Within the limit". And if not than it should print another message "Limit exceeded".
I am trying the below snippet inside the Transform section, but it is showing compilation error. Could anyone please help on this?
Exactly as @sai_kiran1 says... It really depends on what is executed before in order to tell where to set the condition.
If you have a search input, it's likely you'll need to check the ctx.payload.hits.total.
Also keep in mind the transform section (at Watcher root level) is executed after the condition.
In case you need help, I would suggest sharing the Watcher content AND the Watcher execution result (without the transform), so we can see the actual response from the input(s).
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.