Hi! On Thu, Apr 25, 2024 at 4:12 AM lucyfrost--- via developers <developers@lists.mariadb.org> wrote:
I'm developing a project which uses soundex matching (alongside other options more sophisticated than that). This is custom software with a mariad back end.
MariaDB soundex built-in produces codes of apparently arbitary length; the usual is 4 characters. I've come to the conclusion that the best way forward is to mimic Maria's soundex in my code.
I cannot find a description of the algorithm Maria uses though: the only source code I can find is in mf_soundex.c, and that is explicitly limited to 4 characters. But I have installed triggers which generate codes such as A4152636125262
Where is the soundex function found? Anyone know?
Can you show an example of how you got longer codes. MariaDB has two soundex implementations, the one in mf_soundex.c and the other in Item_strfunc.cc, search for Item_func_soundex::val_str(). The later soundex function can generate more characters than 4 (which is probably a bug as it was not intended to work that way) Regards, Monty