We have recently migrated from ES 5.6v to 7.6v.
In ES 5.6 we have been using the below statement to throw an exception and return the default response if the query execution is taking more than the given TimeValue.
While in ES 7.6 we didn't find any method to pass the TimeValue which could throw the Execution exception. We are using the below snippet in 7.6
Can you please help me on how to throw an exception in 7.6 if the query is taking more than expected time.