-
Bug
-
Resolution: Fixed
-
3.0.x
-
None
-
PHP Environment: N/R
Database: N/R
the following segment appears in fulltext_mysql.php:
if (sizeof($this->replace_synonym))
|
{
|
$text = str_replace($this->replace_synonym, $this->match_synonym, $text);
|
}
|
this is, of course, wrong, because str_replace() will substitute parts of a word, while the "synonyms" mechanism should only be used for full words.
just to demonstrate, if $text contains the string "cartridge", this code, using the english synonym tables, will change it to "automobiletridge" (and then, maybe, cut it because it's too long...
)
in general, since the synonyms are not used at all with fulltext_native, and their use is dubious at best with fulltext_mysql, i think the best thing to do would be to scrap the whole idea, remove the synonym table (btw: was the table itself ever debugged? why should "whack" be replaced with "wack", and what is "wack" anyway? who says "vol" is "volume"? can't it be "voluntary"? etc. etc.) from the language directory, and make the thing a bit simpler.
no user is going to complain when they can't find a word that was spelled wrong, either in the message or the search string. otoh, if i search for car* expecting to find carburetor and carpool, i don't want the machine to look for automobile*.
to summarize: please get rid of the synonyms

