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:44:02 UTC

svn commit: r447363 - /lucene/nutch/trunk/src/java/org/apache/nutch/searcher/LuceneQueryOptimizer.java

Author: ab
Date: Mon Sep 18 03:44:01 2006
New Revision: 447363

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

Modified:
    lucene/nutch/trunk/src/java/org/apache/nutch/searcher/LuceneQueryOptimizer.java

Modified: lucene/nutch/trunk/src/java/org/apache/nutch/searcher/LuceneQueryOptimizer.java
URL: http://svn.apache.org/viewvc/lucene/nutch/trunk/src/java/org/apache/nutch/searcher/LuceneQueryOptimizer.java?view=diff&rev=447363&r1=447362&r2=447363
==============================================================================
--- lucene/nutch/trunk/src/java/org/apache/nutch/searcher/LuceneQueryOptimizer.java (original)
+++ lucene/nutch/trunk/src/java/org/apache/nutch/searcher/LuceneQueryOptimizer.java Mon Sep 18 03:44:01 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) {