Skip to content

Commit

Permalink
Fix an NPE when using searcher.max.hits, but NOT using time limit.
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/lucene/nutch/branches/branch-0.8@447359 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
sigram committed Sep 18, 2006
1 parent bff3986 commit e0d7405
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/java/org/apache/nutch/searcher/LuceneQueryOptimizer.java
Expand Up @@ -104,8 +104,10 @@ public LimitedCollector(int numHits, int maxHits, int maxTicks,
super(numHits);
this.maxHits = maxHits;
this.maxTicks = maxTicks;
this.timer = timer;
this.startTicks = timer.timeCounter;
if (timer != null) {
this.timer = timer;
this.startTicks = timer.timeCounter;
}
}

public void collect(int doc, float score) {
Expand Down

0 comments on commit e0d7405

Please sign in to comment.