lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sol myr <solmy...@gmail.com>
Subject Should I use MultiSearcher?
Date Thu, 24 Mar 2011 14:00:30 GMT
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 :)

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