Is it possible to skip some watcher inputs if an earlier input returns hits in Elasticsearch?

Simriti_Bundhoo
Wed, 20 Aug 2025 08:26:05 +0000
Elasticsearch

Hi all,

I’m working on an Elasticsearch Watcher that has multiple search inputs. What I want to do is:

Run the first input query.

If this query returns more than 0 hits, I want to skip running the other inputs entirely and go straight to evaluating the condition and actions.

Basically, I’m looking for a way to short-circuit the inputs so that if one already satisfies a condition (like hits > 0), the other queries don’t run at all.

Is there a way to achieve this in Elasticsearch Watcher? If not directly, what would be the best workaround?

Thanks in advance!

3 posts - 2 participants