Hey community,
Can you advise please: is it possible or what is the correct way to mention in Condition part of watcher several conditions (sorry for tautology).
I want to use smth like this:
"condition": {
"script": {
"source": "if (ctx.payload.aggregations.check.buckets.third.uniq.value == 1 || ctx.payload.aggregations.check.buckets.first.uniq.value == 1 || ctx.payload.aggregations.check.buckets.second.uniq.value == 1 || ctx.payload.aggregations.check.buckets.fourth.uniq.value == 1) return true; return false;",
"lang": "painless" }}
This not work. Only works if I use one OR (||):
("if (ctx.payload.aggregations.check.buckets.third.uniq.value == 1 || ctx.payload.aggregations.check.buckets.first.uniq.value == 1)
So I want to notify me if some of checks is equal 1.