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

Better validate CodecReaders in addIndexes

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      The discussion at LUCENE-8264 made me wonder that we should apply the same checks to addIndexes(CodecReader) that we apply at index time if the input reader is not a SegmentReader such as:

      • positions are less than the maximum position
      • offsets are going forward

      And maybe also check that the API is implemented correctly, eg. terms, doc ids and positions are returned in order?

        Attachments

        1. LUCENE-8277.patch
          10 kB
          Adrien Grand

          Activity

            People

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

              Dates

              • Created:
                Updated: