lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ali Rouhi <>
Subject MultiSearcher "refresh" when underlying searchers need to be recreated?
Date Wed, 07 Sep 2005 20:02:26 GMT

I have a general question about the cost of creating MultiSearchers. Suppose 
you have created a MultiSearcher using a large number of IndexSearchers, 
let's exaggerate to highlight the issue and assume we put an array of 100 
IndexSearchers over large indexes in the MultiSearcher constructor. Suppose 
either 1 of the 100 indexes changes (maybe because we optimized it), or that 
a 101'st index gets added which needs to be included in future searches.

Is it best just to throw away the MultiSearcher and create a new one with 
the updated indexes or is it better to modify the MultiSearcher code to 
allow adding/removing/updating of underlying indexes. What I'm concerned 
with is the cost of recalculating the information which has not changed for 
the other 99 IndexSearchers.

Looking at the MultiSearcher code, it doesn't seem like the constructor does 
a lot of work. So maybe it's just best to close it and create a new one. I 
am not sure though, and any advice/insight would be greatly appreciated.


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message