On Fri, Nov 10, 2006 at 08:13:40PM +0100, Caspar wrote: > Hi I'm using ferret happily on a site with 260ish documents in the > index. Problem is that the site is still in development and I have to > rebuild the index fairly regularly as new fields are added to it, like > today when i added price. I have been using a rebuild index action in > the admin section but this is clearly the wrong way to do it as it > completly kills the site during the rebuild. So question is how do > people handle index rebuilds on sites with large indexes and keep them > live? I have come accross backgroundrb and think this is the way to go > but am unsure about some things. E.g. if you have backgroundrb > rebuilding the index, what happens in the meantime with the old index? > Is it still accessable while the index is rebuilt?
If you open up a searcher on the old index before you start rebuilding, that searcher should be able to search the old index while the rebuild runs. Another way is to create a whole new index, and just swap indexes once you're finished rebuilding. > What happens if someone adds a new record during the index getting > rebuilt? It's up to you to keep track of these changes, i.e. with a db flag telling you if this record needs indexing or not. Once you have such a flag, you could do all your indexing in a backgroundrb job regularly, i.e. check every 10 minutes for records to be indexed, and index them. Jens -- webit! Gesellschaft für neue Medien mbH www.webit.de Dipl.-Wirtschaftsingenieur Jens Krämer [EMAIL PROTECTED] Schnorrstraße 76 Tel +49 351 46766 0 D-01069 Dresden Fax +49 351 46766 66 _______________________________________________ Ferret-talk mailing list [email protected] http://rubyforge.org/mailman/listinfo/ferret-talk

