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 <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]