lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Raimon Bosch <raimon.bo...@gmail.com>
Subject CompareBottom and setBottom in TopFieldCollector and FieldComparator
Date Fri, 10 Jul 2009 10:55:41 GMT


Hi,

I don't understand  the uses of compareBottom and setBottom. I've seen that
setBottom is setting always the minimal score during the comparisons but I
don't see why we need this value.

In the TopFieldCollector I saw this piece of code:

////////////
final int cmp = reverseMul * comparator.compareBottom(doc);
        if (cmp < 0 || (cmp == 0 && doc + docBase > bottom.docID)) {
          return;
        }
if (cmp < 0 || (cmp == 0 && doc + docBase > bottom.docID)) {
          return;
        }
//////////

that I suppose that is the real use of the function but I don't understand
it 100%. Any ideas? 

Regards,
Raimon Bosch.
-- 
View this message in context: http://www.nabble.com/CompareBottom-and-setBottom-in-TopFieldCollector-and-FieldComparator-tp24425303p24425303.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message