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) { ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Nutch-cvs mailing list Nutch-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nutch-cvs