On Sun, Aug 27, 2006 at 07:43:49PM +0200, Florent Solt wrote:
> > 
> > Your best bet however is to create separate Index instances in each
> > thread.
> > 
> 
> Thanks for your answer, but this example was inspirate by what I do with 
> Rails and Ferret. And the main problem is that I have many ajax calls, 
> each using the index... If I open/close for each ajax call an index, it 
> will be too expensive, no ? What are your opinion ?

if you're using Rails, you usually won't encounter multithreaded access 
to a single index instance, since Rails is not threaded (or at least is
not intended to run in a multithreaded way). 

So in any Rails app you'll have at most multiple OS processes accessing 
one physical index, but not multiple threads accessing one instance of 
class Index. Locking problems on physical index level may occur, though.

> PS: I will try tomorrow with a Searcher, stay tuned :)

A Searcher should not try to write-lock, so you'll be on the safe side
as long as only the batch-indexing process will write to the index.

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