文章列表
SearchRequestBuilder builder ;
builder.setTimeout(TimeValue.timeValueMillis(1));
本意是想es查询超过1毫秒就返回超时,但测试发现与想象的不一样。即使耗时100+毫秒也不会超时。
setTimeout方法是不可靠的,解释如下:
Sadly, it is a best effort timeout, its not being checked on all places. Specifically, if you send a query that ends up being rewritten in ...