lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephen Gray <Stephen.G...@anu.edu.au>
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.

Thanks,
Steve


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message