[Xapian-discuss] fast iteration through spellings

Előd Biszak biszakelod at gmail.com
Mon Oct 8 17:00:41 BST 2012


Hi!

I'm using the python bindings and I have a question about the
Databse::get_spelling_suggestion() function. Explicitly iterating through
spellings like

for s in db.spellings: pass

takes about 30 seconds in my database. When I call
db.get_spelling_suggestion( 'porgramming' ) it takes about 0.1 seconds to
get the suggestion. In the source (
http://xapian.org/docs/sourcedoc/html/omdatabase_8cc_source.html#l00535 ) it
seems that it does iterate through the whole spelling table. So my question
is how is it doing it? Is there a faster way to do iterate through terms?


Thanks in advance,
Biszak Előd


More information about the Xapian-discuss mailing list