lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <>
Subject Re: Error reading documents from file index lucene 2.0
Date Fri, 16 Jun 2006 21:10:14 GMT

:         Hits hits =;
:         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?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message