[ https://issues.apache.org/jira/browse/LUCENE-914?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12502705 ]
Paul Elschot commented on LUCENE-914: ------------------------------------- I've been struggling with this before at LUCENE-413 . I think the Scorer.skipTo() contract is geared towards TermScorer.skipTo(target), and rightly so, because that is where it is all done in the end, and the current fast implementation should remain possible. I like the idea to further restrict the spec to say that n *must* be > doc() for defined results, but that should also take into account that doc() is not defined initially. An initial doc() == -1 nicely fits here, too. There are some scorers that could have simplified firstTime logic when doc() always return -1 initially, and iirc Yonik had/has ideas about that, but I can't find these back right now. > Scorer.skipTo(current) remains on current for some scorers > ---------------------------------------------------------- > > Key: LUCENE-914 > URL: https://issues.apache.org/jira/browse/LUCENE-914 > Project: Lucene - Java > Issue Type: Bug > Components: Search > Reporter: Doron Cohen > Priority: Minor > Attachments: lucene-914.patch > > > Background in http://www.nabble.com/scorer.skipTo%28%29-contr-tf3880986.html > It appears that several scorers do not strictly follow the spec of > Scorer.skipTo(n), and skip to current location remain in current location > whereas the spec says: "beyond current". > We should (probably) either relax the spec or fix the implementations. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]