I have a MySQL table with the following columns:
City Country Continent
New York States Noth America
New York Germany Europe - considering there's one ;)
Paris France Europe
If I want to find "New Yokr" with a typo, it's easy with a MySQL stored function:
$querylev = "select City, Country, Continent FROM table
WHERE LEVENSHTEIN(`City`,'New Yokr') < 3"
But in case there are two New York cities, searching with fulltext you can put "New York States" and you get your desired result.
So the question is, could I search "New Yokr Statse" and get the same results?
Is there any function merging levenshtein and fulltext to make an all in one solution or should I create a new column in MySQL concatenating the 3 columns?
I know there are other solutions such as lucene or Sphinx (also soundex, metaphone, but not valid for this) but I think for me could be kind of hard to implement them.