how to get similar search results in MySQL?

You should start by looking into the Soundex algorithm. It assigns a “sound” to a given string which can be used to find closely matching words.

It’s particularly suited to English text but, provided you can live with that, it’s not too bad.

For example, both Pax and packs generate P200, heiress and hares both give H620 and, for your question, both Picadilly and Piccadilly give P234.

So, if you store the Soundex code alongside the word in a database, and indexed on that code, you could very quickly get a list of close matches.

Leave a Comment