lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kelvin Tan <lists-kel...@relevanz.com>
Subject Re: Reuse IndexSearcher?
Date Wed, 20 Aug 2003 01:42:12 GMT
Yep. What I've done is hack a little class to pool the searchers, and whenever 
I update the index, I inform this manager class, and it refreshes the 
searchers. Of course, you can add sugar on top of that, like specifying a TTL 
or something like that.

Kelvin

On Tue, 19 Aug 2003 13:18:24 -0500, Scott Ganyo said:
>Yes.  You can (and should for best performance) reuse an
>IndexSearcher
>as long as you don't need access to changes made to the index.  An
>open
>IndexSearcher won't pick up changes to the index, so if you need to
>see
>the changes, you will need to open a new searcher at that point.
>
>Scott
>
>Aviran Mordo wrote:
>
>>Can I reuse one Instance of IndexSearcher to do multiple searches
>>(in
>>multiple threads) or do I have to instantiate a new IndexSearcher
>>for
>>each search?
>>
>>
>>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: lucene-user-help@jakarta.apache.org





Mime
View raw message