[Xapian-discuss] TermIterator in python bindings causes segfault

Olly Betts olly at survex.com
Mon Oct 29 16:44:52 GMT 2007


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



More information about the Xapian-discuss mailing list