[Xapian-discuss] simple frequency list

Olly Betts olly at survex.com
Tue Mar 18 04:22:29 GMT 2008


On Thu, Mar 13, 2008 at 09:24:47AM +0530, s|s wrote:
> I wrote a python script for finding frequency of terms in database.
> Thought of sharing since it could would come handy for introspecting
> database. Possibly it could be included as an example to python
> bindings..

There's a wiki page for contributing examples:

http://wiki.xapian.org/SampleCode

FWIW, I think it would be more natural to write the loop as:

    for t in database.allterms():
	print t.termfreq, t.term

Cheers,
    Olly



More information about the Xapian-discuss mailing list