Conditional update with elastic search when query returns no document

Hi Team,
I am performing conditional update operation on elastic search doc. How i do is:

  1. I create a query which has conditions on doc level for filtering
  2. I use groovy script to update some of the fields conditionally
    eg: say if doc. date>current_time--> set this value

It works fine. Now the problem is , if query in step 1 returns no doc, step 2 is skipped.
I want to throw exception in this case. How is it possible.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.