On Mon, Jul 30, 2007 at 08:25:59AM -0400, Erik Morton wrote:
> Thanks Jens, that makes sense. I started with the following addition  
> to RDig::Searcher
> 
>        # Returns <tt>true</tt> if RDig's IndexReader has the latest  
> index loaded. False otherwise.
>        def latest?
>          @ferret_searcher.reader.latest?
>        end
> 
> I fired up two script/console instances. In the first I called  
> ClassB.rebuild_index, and in the second console I called  
> RDig.searcher.latest? and received the following seg fault.
> 
>  >> RDig.searcher.latest?
> ./script/../config/../config/../vendor/gems/rdig-0.3.4/lib/rdig/ 
> search.rb:36: [BUG] Bus Error
> ruby 1.8.4 (2005-12-24) [i686-darwin8.6.1]
> 
> Did I break a Ferret rule of some kind by having a reader looking at  
> the version of an index that is being rebuilt?

Yes.
An index rebuild begins with deleting the old index, which will
cause index readers that were opened on the now removed index to fail
this way. So latest? is only good to detect additions/deletions of
documents.

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