lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephen Gray <>
Subject Re-creating IndexSearcher after update
Date Tue, 21 Mar 2006 04:35:55 GMT
Hi everyone,

I have an application that allows both indexing and searching. I'm using a 
single IndexSearcher shared among all sessions.

I want to re-create the IndexSearcher whenever the index changes, but I'm 
assuming that if I do this bad things will happen to people who may be 
currently running a search, or paging through a Hits collection created by 
a previous search (the javadocs on Searchable.close say that you should not 
call close while using objects like Hits). I could maintain an "open 
searches" variable and check it every second, but I'd still have the 
problem of existing Hits collections.

Could someone tell me the best way to do this?

Any help much appreciated.


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

View raw message