Helen Warren writes:
>
> //close the IndexReader object
> myReader.close();
>
> //return results
> return hits;
>
> The myReader.close() line causes the IOException to be thrown. To try
Are you sure it's the myReader.close() that fails?
I'd suspect that to fail as soon as you want to do anythi
: Do you know why I can't close the IndexReader explicitly under some
: circumstances and why, when I do manage to close it I can still call
: methods on the reader?
1) I tried to create a test case that demonstrated your bug based on the
code outline you provided, and i couldn't (see below). t
Hi Otis,
Thanks for the reply. I'm using lucene 1.4.2. I believe that the
IndexSearcher in this version will close the IndexReader if the
IndexReader was supplied implicitly but I'm constructing the
IndexReader first and passing it to the IndexSearcher constructor as I
want to use the reader o
Helen,
I don't know what version of Lucene you are using. The version in CVS
has IndexSearcher that can close the underlying IndexReader for you.
Otis
--- Helen Warren <[EMAIL PROTECTED]> wrote:
> Hi All,
> I'm having some trouble closing an index reader. I'm getting a
> IOException (bad file
Hi All,
I'm having some trouble closing an index reader. I'm getting a
IOException (bad file descriptor). Can anybody tell me what I'm doing
wrong and how I should be closing this object?
An outline of an extract of my code:
// Make a new searcher (indexName passed in as string).
IndexReader myR