I'm currently trying to develop a little search engine on a php/mysql based website.
This search engine needs to be able to search on many text fields (5) and return the results even if the work is misspelled.
For example, a search on the term "ward" could return the result "search your words".
If possible, this could also get a precision setting that I could adjust.
I've developped a MySQL function that insert every characters of the term and the search fields in two temporary table and make a sql to determine if the result is fine. This is great for a Database with 20 - 50 results. But when I try with a database of 1000 - 5000 rows, this is not possible to make it work because i'm getting a timeout.
I also checked for the "soundex" possibilities, but didn't find a way to make it work with wildcard characters.
Here is the question:
I would like to know if any people has an algorythm in MySQL or PHP that could fit my needs.
Everything can help, even if it's just a link or a theorical algorythm.
I've attached my actual algorythm in a txt file.