On Sat, Dec 29, 2007 at 08:30:21PM +0100, double wrote: > Xapian::TermGenerator term_generator; > term_generator.set_flags( Xapian::TermGenerator::FLAG_SPELLING ); You need to actually give TermGenerator a Database object to add spellings to. Add this line here: term_generator.set_database(database); Cheers, Olly