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

IndexOutOfBoundsException in FieldInfos.java

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Invalid
    • 3.0.1
    • None
    • core/index
    • Fedora 12

    • New

    Description

      When retrieving the scoreDocs from a multisearcher, the following exception is thrown:

      java.lang.IndexOutOfBoundsException: Index: 52, Size: 4
      at java.util.ArrayList.rangeCheck(ArrayList.java:571)
      at java.util.ArrayList.get(ArrayList.java:349)
      at org.apache.lucene.index.FieldInfos.fieldInfo(FieldInfos.java:285)
      at org.apache.lucene.index.FieldInfos.fieldName(FieldInfos.java:274)
      at org.apache.lucene.index.TermBuffer.read(TermBuffer.java:86)
      at org.apache.lucene.index.SegmentTermEnum.next(SegmentTermEnum.java:131)
      at org.apache.lucene.index.SegmentTermEnum.scanTo(SegmentTermEnum.java:162)
      at org.apache.lucene.index.TermInfosReader.get(TermInfosReader.java:232)
      at org.apache.lucene.index.TermInfosReader.get(TermInfosReader.java:179)
      at org.apache.lucene.index.SegmentReader.docFreq(SegmentReader.java:911)
      at org.apache.lucene.index.DirectoryReader.docFreq(DirectoryReader.java:644)

      The error is caused when the fieldNumber passed to FieldInfos.fieldInfo() is greater than the size of array list containing the FieldInfo values. I am not sure what the field number represents or why it would be larger than the array list's size. The quick fix would be to validate the bounds but there may be a bigger underlying problem. The issue does appear to be directly related to LUCENE-939. I've only been able to duplicate this in my production environment and so can't give a good test case.

      Attachments

        1. CheckIndex.txt
          26 kB
          Shane

        Activity

          People

            Unassigned Unassigned
            thrykol Shane
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: