Use consistent check whether or not timeout is set

This commit is contained in:
Jason Tedor 2015-07-28 15:44:55 -04:00
parent d8a6ddf580
commit 37177d2f4c
1 changed files with 1 additions and 1 deletions

View File

@ -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) {