Don't use MultiSearcher. Instead create a MultiReader around the separate
IndexReaders for each index and pass that MultiReader to a conventional
IndexSearcher as IndexReader. MultiSearcher is very buggy.

Uwe

-----
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: u...@thetaphi.de


> -----Original Message-----
> From: sol myr [mailto:solmy...@gmail.com]
> Sent: Thursday, March 24, 2011 3:01 PM
> To: java-user@lucene.apache.org
> Subject: Should I use MultiSearcher?
> 
> Hi,
> 
> I need to search a Catalog.
> Most users search *this* year's catalog, but on rare occasions they may
ask
> for old products (from previous years).
> I'm trying to select between 2 options:
> 
> 1) Keep huge big index for all years (where documents have a "year" field,
so
> I can filter out the current year, when needed)
> 
> 2) Keep separate indexes - FSDirectory per year:
> FSDirectory.open("c:/index_2009/"),  FSDirectory.open("c:/index_2010/")
...
> Most searches will run on the current year's FSDirectory, but if I want
old
> product I can use MultiSearcher.
> 
> Which option sounds better?
> The 1st seems easier to code.
> But I thought the 2nd might have better performance - especially since
most
> searches are on the current year.
> Moreover, since changes occur only on current year (old products never
> change), I though the 2nd approach would be easier on the IndexWriter
> (especially on heavy actions like "optimize()").
> 
> What do you thing?
> Thanks :)


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

Reply via email to