[email protected]
[Top] [All Lists]

RE: input reader closed after IndexWriter.addDocument(doc)

Subject: RE: input reader closed after IndexWriter.addDocumentdoc
From: "Kunemann Frank"
Date: Thu, 15 Sep 2005 08:25:21 +0200
What stops you from using the reader before you add the document to the


-----Original Message-----
From: Beady Geraghty [mailto:[email protected]] 
Sent: Thursday, September 15, 2005 2:30 AM
To: [email protected]
Subject: input reader closed after IndexWriter.addDocument(doc)

 am new to Lucene. I don't seem to be able to find the answer to my
from the archive. I hope to get some help with my problem.
 I have :
 Document doc = new Document();
 doc.add( Field.Text( "contents", rdr );
 myIndexWriter.addDocument( doc );
 After this point, it appears that rdr is closed.
 What happens is that I want to subsequently 
use the rdr again by positioning back to the beginning
of the file, and since I opened the rdr (input stream),
I wasn't expect addDocument to close it.
 I am wondering if there is a reason that rdr should be
closed after addDocument, and if there is a way to leave it open ?
 Thank you.

To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

<Prev in Thread] Current Thread [Next in Thread>