python - MySQL: conduct a basic search -


I have a name table in my database and I would like to conduct a fuzzy search on it in my database for example

  Name ID John Smith 1 Edward Smith 2 Gabriel Gray 3 Paul Roberts 4  

At the moment, when I search for databases via Python I can only match exact Can I search? But I want to be able to search fuzzy from where I can search the name "Smith" and bring John Smith and Edward Smith back.

In the simplest form, you like comparison:

< Select pre> * From the table where the name of the name '% smith%';

Full index index (large volume text) for more detailed searches, SOUNDEX () (works on words in English language, matching in other languages Everything can be done with 'practical to some extent' to 'horrible', the livenheatine distance of the word etc..


Comments