lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <hossman_luc...@fucit.org>
Subject Re: Scorer.skipTo() valid before next()?
Date Tue, 24 Oct 2006 18:06:11 GMT
: I got a bit of a surprise trying to re-implement the ConjunctionScorer.
: It turns out that skipTo(0) does not always return the same thing as
: next() on a newly created scorer.  Some scorers give invalid results
: if skipTo() is called before next().

that sounds like a bug to me...

: The javddoc is unclear on the subject, but the javadoc for both
: score() and skipTo() suggest that calling skipTo() first is valid, and
: that seems to make more sense.

i don't see why you would say the javadoc is unclear, the javadoc for
skipTo seems very clear on the subject.  skipTo(0) should be functionaly
equivilent to...

        do {
          if (!next())
            return false;
        } while (0 > doc());
        return true;



-Hoss


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


Mime
View raw message