Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-4924

Make DocIdSetIterator.docID() return -1 when not positioned

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.0, 6.0
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      Today DocIdSetIterator.docID() can either return -1 or NO_MORE_DOCS when the enum is not positioned. I would like to only allow it to return -1 so that we can have better assertions.

      (This proposal is for trunk only.)

        Attachments

        1. LUCENE-4924.patch
          19 kB
          Adrien Grand
        2. LUCENE-4924.patch
          18 kB
          Robert Muir
        3. LUCENE-4924.patch
          9 kB
          Adrien Grand

          Activity

            People

            • Assignee:
              jpountz Adrien Grand
              Reporter:
              jpountz Adrien Grand
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: