lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <luc...@mikemccandless.com>
Subject Re: Best practice for updating an index when reindexing is not an option
Date Thu, 10 Jul 2008 14:27:00 GMT

Why does SubversionUpdate require shutting down the IndexSearcher?   
What goes wrong?

You might want to switch instead to rsync.

A Lucene index is fundamentally write once, so, syncing changes over  
should simply be copying over new files and removing now-deleted  
files.  You won't be able to remove files held open by the  
IndexSearcher, but, once the IndexSearcher restarts you'd then be able  
to delete those files on the next sync.

Mike

Christopher Kolstad wrote:

> Hi.
>
> Currently using Lucene 2.3.2 in a tomcat webapp. We have an action
> configured that performs reindexing on our staging server. However,  
> our live
> server can not reindex since it does not have the necessary dtd  
> files to
> process the xml.
>
> To update the index on the live server we perform a subversion  
> update on the
> lucene index directory.
> Unfortunately this makes it necessary to stop the IndexSearcher  
> while the
> SubversionUpdate is doing its thing.
>
> Presently we've had a requirement from our customer to not disable  
> search.
>
> So my idea was to copy the index directory to another directory and  
> then
> switch the IndexSearcher from the original index directory to the  
> temporary
> directory.
> Then perform the Subversion update, and when done, switch the  
> IndexSearcher
> back to the original (now, updated) index directory.
>
> Does anyone have any other suggestions on how to update the index  
> directory
> from subversion without having to disable the IndexSearcher?
>
> BR
> Christopher
>
> -- 
> Regards,
> Christopher Kolstad
> =============================
> |100 little bugs in the code, debug one, |
> |recompile, 101 little bugs in the code |
> =============================
>
> E-mail: chriswk@ifi.uio.no (University)
> christopher.kolstad@gmail.com (Home)
> chriswk@ovitas.no (Job)


---------------------------------------------------------------------
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