Re: Fuzzy searching inside a MySQL DB

From: Stefan Ram <ram_at_zedat.fu-berlin.de>
Date: 17 Mar 2016 23:31:20 GMT
Message-ID: <sunflower-20160318003043_at_ram.dialup.fu-berlin.de>


ram_at_zedat.fu-berlin.de (Stefan Ram) writes:
>Lew Pitcher <lew.pitcher_at_digitalfreehold.ca> writes:
>>MySQL supports two forms of pattern matching: the standard SQL "LIKE" verb,
>>and the MySQL-specific "REGEXP" verb.
>The MySQL standard function SOUNDEX
>(SOUNDEX(field)=SOUNDEX('sunflower'))
>provides another means to search fuzzyly.

  For the example of the OP:

SELECT SOUNDEX( 'sunflow3r' )= SOUNDEX( 'sunflower' );

+------------------------------------------------+
| SOUNDEX( 'sunflow3r' )= SOUNDEX( 'sunflower' ) |
+------------------------------------------------+
|                                              1 |
+------------------------------------------------+
1 row in set (0.00 sec) Received on Fri Mar 18 2016 - 00:31:20 CET

Original text of this message