[Xapian-discuss] Get a list of all terms in an indexed corpus

VanL van.lindberg at gmail.com
Fri Oct 8 16:44:57 BST 2010


On 10/8/2010 10:21 AM, Richard Boulton wrote:
> Using xapian, you can call xapian.Database.allterms() to get an
> iterator over all the terms.  This iterator returns
> xapian.TermListItem objects, which have a .termfreq property
> containing the number of documents the term occurs in (and a .term
> property containing the term string itself).  You'll still need to
> sort the frequencies, but this should give you what you need.
> 
> Hope this helps,

Perfect! This was just what I needed.

Thanks,

Van




More information about the Xapian-discuss mailing list