lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Lucene-java Wiki] Update of "LuceneFAQ" by GrantIngersoll
Date Thu, 25 Oct 2007 12:58:39 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Lucene-java Wiki" for change notification.

The following page has been changed by GrantIngersoll:
http://wiki.apache.org/lucene-java/LuceneFAQ

The comment on the change is:
corrected information concerning how TopDocCollector works.

------------------------------------------------------------------------------
  	if (score > 0.0f) {
  		totalHits++;
  		if (hq.size() < numHits || score >= minScore) { 
-                 // *** When hq.size() >= numHits, collect() operation will stop, Do we
really want it stop?  ***
-                 // *** What will happen if there are still some else docs whose score higher
than minScore ? ***
  			hq.insert(new ScoreDoc(doc, score));        
  			minScore = ((ScoreDoc)hq.top()).score; // maintain minScore     
  		}   
@@ -403, +401 @@

  }
  
  }}}
+ This code means that once the PriorityQueue is full, it will ONLY insert new documents if
the score of the new document is greater than the minimum score in the queue.  It does not
mean Lucene will stop scoring documents once the queue is full.
  
  === Indexing ===
  

Mime
View raw message