Hi there!
I am making a watch with 2 chain searches: [search1, search2]. They differ only in query body and return same fields so I'd like to put it in one watch.
The question is:
How to write multiple conditions, i.e if there is a hit for any search, fire an alarm?
wildcard seems not work, only if write a search name search1 condition works
"condition": {
"compare": {
"ctx.payload.*.hits.total": {
"gt": "0"
}
}
}
If use script with && to concatenate comparisons there is still a problem in Action section,
How to access payload fields {{#ctx.payload.hits.hits}}{{key}}{{/ctx.payload.hits.hits}} for specific (triggered) condition/search?
Or the only way to write 2 similar watches each with it own search?