[Xapian-discuss] allterms() in Python

Francis Irving francis at flourish.org
Fri Nov 24 23:33:58 GMT 2006


On Thu, Nov 23, 2006 at 05:38:33PM +0000, Olly Betts wrote:
> > Traceback (most recent call last):
> >   File "./xapdex.py", line 274, in ?
> >     check_removed_docs(xapian_db)
> >   File "./xapdex.py", line 254, in check_removed_docs
> >     for term in xapian_db.allterms():
> >   File "/usr/lib/python2.4/site-packages/xapian.py", line 864, in next
> 
> In 0.9.9, xapian.py only has 734 lines...
> 
> What's the first line of /usr/lib/python2.4/site-packages/xapian.py?
> It should say it is generated by SWIG 1.3.30.

It just says "SWIG" with no version number.

Turns out I was using python2.4-xapian 0.9.2-1 rather than
python-xapian 0.9.9-1.99edgy

Much better, it works now. Each term is a 4 element list:
    ['100', 0, 2, <xapian.PositionIter instance at 0xb7d56f2c>]
which I presume is intentional.

Francis



More information about the Xapian-discuss mailing list