On Wed, May 24, 2006 at 02:35:20PM +0200, Marcus Andersson wrote:
> Jens Kraemer wrote:
> > On Wed, May 24, 2006 at 09:57:13AM +0200, Marcus Andersson wrote:
> > as long as only one process is writing to the index that's fine. But you
> > have to reopen searchers to see the changes done to the index.
> > 
> How does that work in a normal Rails application if you run in a 
> production environment (ie cluster of Mongrels, FCGI or SCGI where you 
> always have a number of processes running)? I mean, every instance of 
> the Rails env might want to add something to or read from the index.

there's a file based locking mechanism, Ferret's index class handles
possible collisions by waiting and retrying the write after a short time.
It also handles re-opening the searcher for you.

If you don't use the Index class it's up to you to detect changes to the
index and re-open your searcher. there's a method named latest?
somewhere, you could look into the Index class to see how it's done
there.

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

Reply via email to