lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <>
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;


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message