On Dec 7, 2005, at 2:38 AM, Alan Chandler wrote:
Worse than that, when I attempt to access Hits.doc(0) I am getting an
immediate IOException with the message "Bad file descriptor". I
think this
must be because by that time I have closed the indexSearcher (and
therefore
the Reader that sat behind it). Its not clear to me how hits are
associated
with a reader. Is it possible to close the reader and then re-open
it later
to access a document with the hit?
You must keep your IndexSearcher instance alive and well when working
with Hits. Hits internally uses the searcher to page through results
- it does not keep all results in memory. I'm not sure why you
aren't seeing all the documents you expect, but if you package it up
as a simple RAMDirectory-using JUnit TestCase then I'd be happy to
run it and see.
Erik
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]