[Xapian-discuss] How to use TermGenerator alone

David Versmisse david.versmisse at itaapy.com
Fri Nov 14 16:45:21 GMT 2008


For some obscure reasons, we want to use in a part of our program
TermGenerator only to recover the words of a text. Does this is
possible with the python binding ?

I tried:

tg = TermGenerator()
tg.index_text('hello world')
[term.term for term in tg.get_document().termlist()]

but i don't have the position of the words (not in term ?), and, they
are ordered alphabetically, so i can not find them.

We use xapian for our tools (www.hforge.org) and we are very happy.

Thank you by advance for your answer.

David Versmisse
Itaapy <http://www.itaapy.com>         Tel +33 (0)1 42 23 67 45
9 rue Darwin, 75018 Paris              Fax +33 (0)1 53 28 27 88
Itaapy mailing list
Itaapy at ikaaro.org

More information about the Xapian-discuss mailing list