lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael McCandless (JIRA)" <j...@apache.org>
Subject [jira] Commented: (LUCENE-2327) IndexOutOfBoundsException in FieldInfos.java
Date Thu, 18 Mar 2010 09:32:27 GMT

    [ https://issues.apache.org/jira/browse/LUCENE-2327?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12846813#action_12846813
] 

Michael McCandless commented on LUCENE-2327:
--------------------------------------------

This exception looks like index corruption... would be good to get to the root cause of how
this happened.

Your terms dict, which records the field number and character data for each term, has somehow
recorded a field number of 52 when in fact this segment appears to only have 4 fields.

Can you run CheckIndex on the index and post the result back?

Any prior exceptions when creating this index?

I don't think adding a bounds check to FieldInfos makes sense -- the best we could do is throw
a "FieldNumberOutOfBounds" exception.

> IndexOutOfBoundsException in FieldInfos.java
> --------------------------------------------
>
>                 Key: LUCENE-2327
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2327
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: Index
>    Affects Versions: 3.0.1
>         Environment: Fedora 12
>            Reporter: Shane
>            Priority: Minor
>
> 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.

-- 
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: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


Mime
View raw message