[Xapian-discuss] Howto use the term iterator?

John Wards jwards at whiteoctober.co.uk
Thu Oct 2 13:35:28 BST 2008


On Thu, 2008-10-02 at 12:08 +0100, Olly Betts wrote:
> > How do I use the termiterator returned from:
> >
> > $odoc->termlist_begin();
> Almost exactly as you're using the MSetIterator $i above, but the
> method
> to read the term is get_term() not get_document().  There's more
> information here:

Ah, thanks for that. I'll give it a go.
> 
> > I have tried foreaching on it and that doesn't work.
> 
> It would be nice if this worked, but nobody's written the wrappers
> required to implement it yet.

Hmm sounds like a challenge. There is iterator stuff in spl which might
be helpful.

http://uk.php.net/spl

Cheers
John




More information about the Xapian-discuss mailing list