I'll start with that I have no idea what would be the proper keywords to find this, therefore, please excuse me for, probably, misleading title and/or repeated question.
For example, when you search "potat" in google, it automaticly points you to potato. How could I achieve this in my application?
Nuance: it has to be multilingual, since application is primary oriented for non-English people.
Thanks in advance!
Edit:
Uhm, are there any alternatives or anything to Sphinx? Because it looks like on the destination server where the application will be hosted when published, they 开发者_如何学Gowon't have it.
there's a fine library called sphinx that can be installed with mysql or it could run as a separated deamon, it includes an API for different languages (including php)
it will build indexes so 'potat','potato' and 'potatoes' would be treated as the same word.
And to do the "Did you mean.." it has an option when indexing the information that saves the list of words and their frequency on the documents, so you could as this list if no results are found
Good Luck
you could try to take a look at mysql's SOUNDS LIKE- or SOUNDEX()-syntax, it seems to improve your search results, but this isn't usable for getting some kind of "did you mean ???"-suggestions.
精彩评论