Lucene Error While Reading binary block : java.io.EOFException

Posted by tushar Khairnar on Stack Overflow See other posts from Stack Overflow or by tushar Khairnar
Published on 2009-08-05T11:06:59Z Indexed on 2010/04/18 20:03 UTC
Read the original article Hit count: 478

Filed under:
|
|

Hi,

I am getting java.io.EOFException while reading a binary block from lucene index. I am storing java object as byte-array in lucene index field and reading it when hit occurs.

Here is stack trace :

Caused by: java.io.EOFException at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2281) at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2750) at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:780) at java.io.ObjectInputStream.(ObjectInputStream.java:280) at org.terracotta.modules.searchable.util.SerializationUtil$OIS.(SerializationUtil.java:20)

I have some background threads which write into index. But i buffer them and then write them at once like 1000. Occasionally I also issue optimize() on index. When I write, I am re-opening IndexReader. Does this is happening because of IndexReader re-opening call?

Thanks.

Regards Tushar

© Stack Overflow or respective owner

Related posts about lucene

Related posts about java