:         Hits hits = indexSearcher.search(query);
:         indexSearcher.close();
:         System.out.println("Hits found:" + hits.length());
:         Iterator<Hit> i = hits.iterator();

It's not legal to use an instance of Hits returned from a Searcher after
that Searcher has been closed.  The reason it may work sometimes with a
small number of documents is that Hits does some caching that makes it
unneccessary to reuse the searcher.

I'm not sure why it works with a RAMDirectory ... maybe close is a is a
NOOP in that case?

-Hoss


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to