You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nutch.apache.org by ab...@apache.org on 2006/09/18 12:43:07 UTC

svn commit: r447359 - /lucene/nutch/branches/branch-0.8/src/java/org/apache/nutch/searcher/LuceneQueryOptimizer.java

Author: ab
Date: Mon Sep 18 03:43:07 2006
New Revision: 447359

URL: http://svn.apache.org/viewvc?view=rev&rev=447359
Log:
Fix an NPE when using searcher.max.hits, but NOT using time limit.

Modified:
    lucene/nutch/branches/branch-0.8/src/java/org/apache/nutch/searcher/LuceneQueryOptimizer.java

Modified: lucene/nutch/branches/branch-0.8/src/java/org/apache/nutch/searcher/LuceneQueryOptimizer.java
URL: http://svn.apache.org/viewvc/lucene/nutch/branches/branch-0.8/src/java/org/apache/nutch/searcher/LuceneQueryOptimizer.java?view=diff&rev=447359&r1=447358&r2=447359
==============================================================================
--- lucene/nutch/branches/branch-0.8/src/java/org/apache/nutch/searcher/LuceneQueryOptimizer.java (original)
+++ lucene/nutch/branches/branch-0.8/src/java/org/apache/nutch/searcher/LuceneQueryOptimizer.java Mon Sep 18 03:43:07 2006
@@ -104,8 +104,10 @@
       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) {