lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug Cutting <cutt...@lucene.com>
Subject Re: CachedSearcher
Date Wed, 17 Jul 2002 15:51:10 GMT
Halácsy Péter wrote:
> I made an IndexReaderCache class from the code you have sent (the code in demo/Search.jhtml).
> But this causes exception:
> IndexSearcher searcher = new IndexSearcher(cache.getReader("/data/index"));
> searcher.close();
> 
> 
> searcher = new IndexSearcher(cache.getReader("/data/index"));
> searcher.search(aQuery);
> 
> when I call the close method the searcher closes the indexreader

You don't need to close the searcher.  If you don't close it, you won't 
have this problem.  Finalizers will close the open files.

Doug



--
To unsubscribe, e-mail:   <mailto:lucene-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>


Mime
View raw message