lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <luc...@mikemccandless.com>
Subject Re: java.io.IOException: read past EOF non-corrupt index
Date Wed, 07 Jan 2009 14:26:21 GMT

That exception seems to indicate that the fdx file being opened by
FieldsReader is 0 length (it's trying to read the first int from that
file).

Is the exception repeatable, if you try again to call
IndexReader.open?

It's odd that CheckIndex finds no problem with the index, but opening
an IndexReader does.

Or: did you try to open the IndexReader while the IndexWriter was
still open?  Or had IndexWriter already been closed?

Can you post "ls -l" output from your index dir?

Mike

1world1love wrote:

>
> Greetings all. I have an index that I have optimized and when I try  
> to open
> the index I get this:
>
> java.io.IOException: read past EOF
> 	at
> org 
> .apache 
> .lucene.store.BufferedIndexInput.readBytes(BufferedIndexInput.java)
> 	at
> org.apache.lucene.index.CompoundFileReader 
> $CSIndexInput.readInternal(CompoundFileReader.java)
> 	at
> org 
> .apache 
> .lucene.store.BufferedIndexInput.refill(BufferedIndexInput.java)
> 	at
> org 
> .apache 
> .lucene.store.BufferedIndexInput.readByte(BufferedIndexInput.java)
> 	at org.apache.lucene.store.IndexInput.readInt(IndexInput.java)
> 	at org.apache.lucene.index.FieldsReader.<init>(FieldsReader.java)
> 	at  
> org.apache.lucene.index.SegmentReader.initialize(SegmentReader.java)
> 	at org.apache.lucene.index.SegmentReader.get(SegmentReader.java)
> 	at org.apache.lucene.index.SegmentReader.get(SegmentReader.java:269)
> 	at
> org.apache.lucene.index.DirectoryIndexReader 
> $1.doBody(DirectoryIndexReader.java:99)
> 	at
> org.apache.lucene.index.SegmentInfos 
> $FindSegmentsFile.run(SegmentInfos.java)
> 	at
> org 
> .apache 
> .lucene.index.DirectoryIndexReader.open(DirectoryIndexReader.java:111)
> 	at org.apache.lucene.index.IndexReader.open(IndexReader.java:316)
> 	at org.apache.lucene.index.IndexReader.open(IndexReader.java:227)
> 	at LuceneTest.MyMethod(LuceneTest.java:226)
>
> Obviously there are a few threads on this and most seem to indicate a
> corrupted index, but I ran checkindex from a different machine and  
> this is
> the result:
>
> Opening index @ /lucenedata/index3
>
> Segments file=segments_1q9 numSegments=1 version=FORMAT_HAS_PROX  
> [Lucene
> 2.4]
>  1 of 1: name=_v3 docCount=12695236
>    compound=true
>    hasProx=true
>    numFiles=1
>    size (MB)=17,679.742
>    no deletions
>    test: open reader.........OK
>    test: fields, norms.......OK [6 fields]
>    test: terms, freq, prox...OK [18507503 terms; 1204902303 terms/docs
> pairs; 1978598629 tokens]
>    test: stored fields.......OK [76171416 total field count; avg 6  
> fields
> per doc]
>    test: term vectors........OK [0 total vector count; avg 0 term/freq
> vector fields per doc]
>
> No problems were detected with this index.
>
> Any ideas why this may be happening?
> -- 
> View this message in context: http://www.nabble.com/java.io.IOException%3A-read-past-EOF-non-corrupt-index-tp21319971p21319971.html
> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message