Bug #15519 Soundex in the words, not in the phrase.
Description:
Hi,
The function Soundex is working fine, this a feature request only.
The current Soundex function returning:
mysql> select soundex('this is a test');
+---------------------------+
| soundex('this is a test') |
+---------------------------+
| T2323 |
+---------------------------+
1 row in set (0.00 sec)
mysql> select soundex('this');
+-----------------+
| soundex('this') |
+-----------------+
| T200 |
+-----------------+
1 row in set (0.00 sec)
mysql> select soundex('is');
+---------------+
| soundex('is') |
+---------------+
| I200 |
+---------------+
1 row in set (0.00 sec)
mysql> select soundex('a');
+--------------+
| soundex('a') |
+--------------+
| A000 |
+--------------+
1 row in set (0.00 sec)
mysql> select soundex('test');
+-----------------+
| soundex('test') |
+-----------------+
| T230 |
+-----------------+
1 row in set (0.00 sec)
I suggest a new function called SoundexWS, SoundexWords or similar, returning the Soundex of each individual word with a space between result, this a example of the use:
select soundexws('this is a test');
result: T200 I200 A000 T230
This a very good to find specific word sounds in the phrase, because in the select with `where soundex(somepharse) like soundex(someword)` the result is not egual.
How to repeat:
select soundex('this is a test');
select soundex('this');
select soundex('is');
select soundex('a');
select soundex('test');
Suggested fix:
new function SoundexWS or similar
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.037 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.
Description: Hi, The function Soundex is working fine, this a feature request only. The current Soundex function returning: mysql> select soundex('this is a test'); +---------------------------+ | soundex('this is a test') | +---------------------------+ | T2323 | +---------------------------+ 1 row in set (0.00 sec) mysql> select soundex('this'); +-----------------+ | soundex('this') | +-----------------+ | T200 | +-----------------+ 1 row in set (0.00 sec) mysql> select soundex('is'); +---------------+ | soundex('is') | +---------------+ | I200 | +---------------+ 1 row in set (0.00 sec) mysql> select soundex('a'); +--------------+ | soundex('a') | +--------------+ | A000 | +--------------+ 1 row in set (0.00 sec) mysql> select soundex('test'); +-----------------+ | soundex('test') | +-----------------+ | T230 | +-----------------+ 1 row in set (0.00 sec) I suggest a new function called SoundexWS, SoundexWords or similar, returning the Soundex of each individual word with a space between result, this a example of the use: select soundexws('this is a test'); result: T200 I200 A000 T230 This a very good to find specific word sounds in the phrase, because in the select with `where soundex(somepharse) like soundex(someword)` the result is not egual. How to repeat: select soundex('this is a test'); select soundex('this'); select soundex('is'); select soundex('a'); select soundex('test'); Suggested fix: new function SoundexWS or similar