On Wed, Aug 01, 2007 at 08:45:26AM -0400, Erik Morton wrote:
> If I create an IndexReader like so:
> 
> ir = IndexReader.new([index1, index2])
> 
> How can I get the "sub readers" for the two indexes? From the RDocs I  
> only see the ability to call ir.latest?, which results in the segfault.

First create two separate readers for your indexes:
reader1 = IndexReader.new(index1)
reader2 = IndexReader.new(index2)

Then build your joint reader from them:
ir = IndexReader([reader1, reader2])

Now you can easily use
reader1.latest? && reader2.latest?

to determine if your ir instance needs some refreshing.


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