lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephane James Vaucher <vauch...@cirano.qc.ca>
Subject Re: Swapping Indexes?
Date Tue, 17 Aug 2004 18:30:17 GMT
On Tue, 17 Aug 2004, Patrick Burleson wrote:

> On Tue, 17 Aug 2004 13:17:10 -0400 (EDT), Stephane James Vaucher 
> > 
> > Actually, I use a IndexWriter in overwrite mode on the master dir and
> > merge the temp dir. This cleans up the old master.
> > 
> 
> I'm a bit of a Lucene newbie here, and I am trying to understand what
> you mean by "merge the temp dir"? 

IndexWriter.addIndexes()

> Do you copy your exiting Index to
> the temp location, then use the overwrite feature of IndexWriter to
> re-create the master, then what do you merge? Shouldn't the master
> index now have everything?

What I mean is the following:

1) create tmp dir
2) redirect searchers to tmp dir
3) wait for everyone to use tmp dir (or other mecanism)
4) open indexwriter on master dir erasing it
5) merge tmp directory, using addIndexes() method
6) redirect searchers to new master dir
 
> > 
> > I used to way some time (~1 minute) for all searches on the old master to
> > finish after redirecting to the temp dir, then I would switch to the new
> > master.
> > 
> 
> I'm going to make this a setting, so that test won't have to wait a
> whole minute. But I think this is the cleanest solution without having
> to implement some sort of leaseing solution. Our searches should be
> fast and 1 minute is a long time. They should all be done by then.
 
I used to reindex all my docs at 5h00AM, I probably could have waited 10 
minutes since I didn't have users, it's all about requirements ;)

> Thanks again,
> Patrick
> 

sv


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


Mime
View raw message