lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Muir (Created) (JIRA)" <>
Subject [jira] [Created] (LUCENE-3580) Most 4.0 PostingsReaders don't obey DISI contract
Date Thu, 17 Nov 2011 03:32:51 GMT
Most 4.0 PostingsReaders don't obey DISI contract

                 Key: LUCENE-3580
             Project: Lucene - Java
          Issue Type: Bug
    Affects Versions: 4.0
            Reporter: Robert Muir

While trying to do some refactoring, I noticed funky things going on with some codecs.

One problem is that DocIdSetIterator says the following:
Returns the following:
   * <ul>
   * <li>-1 or {@link #NO_MORE_DOCS} if {@link #nextDoc()} or
   * {@link #advance(int)} were not called yet.

But most 4.0 Docs/DocsAndPositionsEnums don't actually do this (e.g. return 0). instead we

are relying on Scorers to 'cover' for them, which is inconsistent. Some scorers actually rely
upon this behavior, for example look at ReqExclScorer.toNonExcluded(), it calls docId() on
excluded part before it calls nextDoc()

So we need to either fix these enums, change these enums to not extend DocIdSetIterator (and
what the actual contract should be for these enums), change DocIdSetIterator, or something

Fixing the enums to return -1 here when they are uninitialized kinda sucks for the ones summing
document deltas...

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


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

View raw message