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 blueye118
Date Thu, 25 Oct 2007 07:03:41 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 blueye118:
http://wiki.apache.org/lucene-java/LuceneFAQ

------------------------------------------------------------------------------
  Even though index searching is a read only operation, the !IndexSearcher must momentarily
lock the index when it is opened in order to get the list of files in the index.  If locking
is not configured properly it gets an incorrect list (because the list of files changes as
the !IndexWriter adds docs or optimizes the index).  Remote filesystems (like NFS and Samba)
rarely work, because they cannot make the transactional guarantees neccessary to ensure that
all clients get consistent views of the directory.
  
  ==== Will TopDocCollector#collect(int doc, float score) operate on documents? ====
- Does TopDocCollector continue collect when hq is full?
+ Does '''TopDocCollector''' continue collect when hq is full?
  IF NOT, does it mean that the collect operation DO NOT cover all the documents?
+ Pls refer to lucene-2.2.0-src
  {{{
  class TopDocCollector extends HitCollector{
  // ...
@@ -386, +387 @@

      this.numHits = numHits;
      this.hq = hq;
    }
-   
+ // ...  
    public void collect(int doc, float score) {
  	if (score > 0.0f) {
  		totalHits++;
- 		if (hq.size() < numHits || score >= minScore) {        
+ 		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     
  		}   

Mime
View raw message