Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Plurals and Inflectional Full Text Searching

Status
Not open for further replies.

codecontractor

Programmer
Jan 8, 2005
13
US
I've searched all over and havn't found anyone who's documented any good word variation search for MySQL.

I undertand that searching for inflectional versions of words can be quite tricky, but MSSQL does it...

Does anyone know of a PHP tool or something to adjust the query string before submitting it to MySQL? Or is there something internal to MySQL that I'm missing?

Thanks,
-Ben
 
That sort of logic requires a knowledge of the grammar of the language the field content is written in, which MySQL does not have. It doesn't even know what language is being searched (though it does know the character set used). So, it can't be done with MySQL alone. You would need to have a routine that would take a term like "search" and replace it with "search searches searched searching", which you would then submit to MySQL. Maybe somebody else might know something which would do that for you.
 
Have a look in the documentation for SOUNDEX. It's not quite what you want, but may get you started

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first.
'If we're supposed to work in Hex, why have we only got A fingers?'
Drive a Steam Roller
 
Thanks for your help guys. For the time being I'm using the Chuggnut implementation of the Porter Stemming Algorithm to find the stem and then I use Match ( "stem*" ).

This isn't a perfect solution as "windy" would also find "windlass", but it'll do for now.

Thanks again,
-Ben
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top