What is the best way to build a mySQL & PHP search?
I am currently using things like
%term%
I want it to be able to find the result even if they spell it slightly wrong, for example:
Field value = “One: Stop Shop:
They search:
One Shop Stop
OR
One Stop Shop
Etc.. I want a really smart search so they find the information even if they don’t search the exact thing.
What is the best way to build a smart search like this?
like '%term%'is terrible slow and unoptimized , you might want to add full-text for this column, and use boolean mode for thisSuch as
Take note on the min word lengths is 4, so, you need to consider change it to three, and full-text search only available for myisam
Other opensource search engine like sphinx is ideal for this too