Use consistent check whether or not timeout is set
This commit is contained in:
parent
d8a6ddf580
commit
37177d2f4c
|
@ -176,7 +176,7 @@ public class ContextIndexSearcher extends IndexSearcher implements Releasable {
|
|||
|
||||
@Override
|
||||
public void search(List<LeafReaderContext> leaves, Weight weight, Collector collector) throws IOException {
|
||||
final boolean timeoutSet = searchContext.timeoutInMillis() != -1;
|
||||
final boolean timeoutSet = searchContext.timeoutInMillis() != SearchService.NO_TIMEOUT.millis();
|
||||
final boolean terminateAfterSet = searchContext.terminateAfter() != SearchContext.DEFAULT_TERMINATE_AFTER;
|
||||
try {
|
||||
if (timeoutSet || terminateAfterSet) {
|
||||
|
|
Loading…
Reference in New Issue