[Xapian-discuss] TermIterator in python bindings causes segfault

Olly Betts
Mon, 29 Oct 2007 16:44:53 -0000

On Mon, Oct 29, 2007 at 05:21:44PM +0100, Carsten Reimer
wrote:
> I tried to figure out how to determine the number of terms in the
> TermIterator I got by get_matching_terms_begin(docid) but I did not find
> any way to do this. If I had that number I could easily stop the
> iterator after the last term has been read.

Compare it to the result of get_matching_terms_end(docid).

However, I'd recommend using the "Pythonic" iterators.  See the
documentation of the Python bindings for details.

Cheers,
    Olly