Closed
Description
Consider the following example of intentionally setting the query timeout value in the Java API to a very small number:
SearchResponse sres = client.prepareSearch("index_name")
.setTimeout(TimeValue.timeValueNanos(1))
.addAggregation(AggregationBuilders.terms("id").field("id").size(1000).shardSize(1000))
.execute()
.actionGet();
System.out.println("Is query timed out? " + sres.isTimedOut());
The query returns in > 1 nanosecond, but the isTimedOut parameter is false. Would like to get a clarification on this. Should isTimeOut return true in this case? Or does it not return true because of the following enhancement request (#4586) to actually terminate queries that exceed the query timeout?