Hi, I'm doing a fulltext search with MySql (using MATCH ... AGAINST, see http://dev.mysql.com/doc/mysql/en/Fulltext_Search.html) and I'm having some trouble with the relevancy ratings.
What I want to do is give my users a percentage rating or maybe even a nice percentage graphic. But, the MATCH ... AGAINST function returns a floating point number that I have seen range from 0 to 50. Has anyone tried playing with this number to get a percentage out of it? Any successes?
One idea I have in mind is to use a logarithmic conversion factor, because the number seems to hang around 0.66 for semi-good matches, stay at about 4-5 for good matches and in some cases jump to 20-30 on really good matches (or really spammy ones). Then I could set anything above 10 to be a 99-100% match and do a log base 10 on everything else.
Of course, all this is with a pretty small set of data (100-200 rows) and column size (100 - 200 words) so I may be completely off on the numbers here.
Any help or experience anyone has in this area would be greatly appreciated.
MySql Full Text Relevancy
Moderator: General Moderators
-
twindagger
- Forum Newbie
- Posts: 10
- Joined: Tue Feb 24, 2004 10:08 am
- Location: Utah