I add timeout param in search body, then the response shows this query is timeout, took 233 ms. I'm wondering about whether the timeout control did work.
I Javadoc, it describes this param as a time limiter in searching:
/**
* An optional timeout to control how long search is allowed to take.
*/
public SearchSourceBuilder timeout(TimeValue timeout) {
this.timeout = timeout;
return this;
}
If the timeout limit work, whether the response will something like following:
"took" : 200,
"timed_out" : true
I my mind, the took
shows the actual time this searching spend. therefore, If the timeout param work, why took > timeout
is allowed?