On Sun, Jul 29, 2007 at 02:34:26PM -0400, Erik Morton wrote:
> I have a site with two indexes. Index A is created offline by RDig  
> and queried from the web via RDig (specifically,  
> RDig.searcher.search). Index B is managed by AAF with :remote =>  
> true. Simple enough. However, I need to query both indexes from RDig.  
> Usually this is ok, as I modified RDig to accept an array of  
> search_paths with an element for index A and index B.
> 
> However, when Index B is updated by AAF, RDig.searcher.search will  
> not "see" the changes to Index B until I restart Mongrel (or restart  
> script/console). If I query Index B directly through  
> ClassB.find_by_contents("myfield:my_value") I see the updated results  
> immediately with no restart.
> 
> I know that RDig creates a single IndexReader for class. Does the  
> IndexReader cache the segments files in memory?

Yes.

> Does anyone have any ideas?

You can check if your reader still 'sees' the most recent version of the
index with the latest? method, and re-open it accordingly. You might
have to hack RDig a bit to allow opening a new reader, but this
shouldn't be too hard.

Cheers,
Jens


-- 
Jens Krämer
webit! Gesellschaft für neue Medien mbH
Schnorrstraße 76 | 01069 Dresden
Telefon +49 351 46766-0 | Telefax +49 351 46766-66
[EMAIL PROTECTED] | www.webit.de
 
Amtsgericht Dresden | HRB 15422
GF Sven Haubold, Hagen Malessa
_______________________________________________
Ferret-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ferret-talk

Reply via email to