lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Apache Lucene" <>
Subject Re: IOException and index corruption
Date Thu, 12 Oct 2006 15:13:34 GMT
For example in the following statement
 doc.add(new Field("contents", parser.getReader(), Field.TermVector.YES));

The reader is causing the IOException when internally invertDocument()
method is called where tokenstream is generated from the reader. I am not
worried if the document info is corrupted in the index. But what I care the
most is if it affects other index data.

What is the best way to recover this? Unfortunately there is no easy way to
delete the document. If I keep a counter and track down this document. Can I
delete the document with IndexReader.deleteDocument(docNum); ?

On 10/12/06, Erik Hatcher <> wrote:
> On Oct 12, 2006, at 10:17 AM, Apache Lucene wrote:
> > When I am adding a document to the lucene index if the method
> > throws an
> > IOException and if I continue with adding other documents ignoring the
> > exception, will the index be corrupted? What happens to the fields
> > which are
> > already written to the index?
> This would surely depend on what caused the IOException.  I would not
> recommend continuing to add documents in light of an IOException though.
>         Erik
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message