[Xapian-discuss] Xapian, PHP bindings and spellings correction

Olly Betts olly at survex.com
Tue Mar 3 11:48:36 GMT 2009


On Tue, Mar 03, 2009 at 11:23:31AM +0000, Bruno at Badiliz wrote:
> Even with this code, get_corrected_query_string()does not return any words even
> with a misspell word "chaussuire"  in a database of 40000 doc and 436 doc which
> contain "chaussure" without the "i" !!!

I suspect you haven't added any spellings to your database.

You can either do this from the text being indexed (if using
TermGenerator, then set FLAG_SPELLING to do it automatically:
http://xapian.org/docs/apidoc/html/classXapian_1_1TermGenerator.html )
or add spellings from a dictionary (using WritableDatabase::add_spelling():
http://xapian.org/docs/apidoc/html/classXapian_1_1WritableDatabase.html )
or both if you wish.

Cheers,
    Olly



More information about the Xapian-discuss mailing list