morphboy23 Posted July 2, 2007 Share Posted July 2, 2007 I've been checking a lot of examples for utilizing fulltext indexing and how to use MATCH()...AGAINST(), and I noticed that all the relevancy scores returned in these examples are not integers, many times below 1 even. Yet my queries always return whole-number scores, like 1 2 3 etc. Nothing like the .8943246 (whatever) I've seen elsewhere. Am I doing something wrong? Quote Link to comment https://forums.phpfreaks.com/topic/58120-solved-fulltext-indexing-and-matchagainst/ Share on other sites More sharing options...
Wildbug Posted July 2, 2007 Share Posted July 2, 2007 You may be somehow (inadvertently) casting the value as an integer or looking at the wrong value. Quote Link to comment https://forums.phpfreaks.com/topic/58120-solved-fulltext-indexing-and-matchagainst/#findComment-288273 Share on other sites More sharing options...
morphboy23 Posted July 3, 2007 Author Share Posted July 3, 2007 Here is an example of one of my queries: SELECT DISTINCT u.iduser, u.username, i.idinquiry, i.title, i.categories, i.date, i.anonymous, (SELECT COUNT(*) FROM responses AS r WHERE r.idinquiry = i.idinquiry) AS counter, MATCH(i.title, i.text) AGAINST('" . $q . "' IN BOOLEAN MODE) AS score FROM users AS u, inquiries AS i WHERE MATCH(i.title, i.text) AGAINST('" . $q . "' IN BOOLEAN MODE) AND u.iduser = i.iduser ORDER BY score DESC Anyone have any ideas? I'm not sure why the score would be converted to integers, if that is even the case. Any help is appreciated. Quote Link to comment https://forums.phpfreaks.com/topic/58120-solved-fulltext-indexing-and-matchagainst/#findComment-288426 Share on other sites More sharing options...
Wildbug Posted July 3, 2007 Share Posted July 3, 2007 How many rows are in the database? Quote Link to comment https://forums.phpfreaks.com/topic/58120-solved-fulltext-indexing-and-matchagainst/#findComment-288446 Share on other sites More sharing options...
morphboy23 Posted July 3, 2007 Author Share Posted July 3, 2007 In the database? Not sure... The 'inquiries' table has about 30-40 test rows with the fulltext index (title, text) Quote Link to comment https://forums.phpfreaks.com/topic/58120-solved-fulltext-indexing-and-matchagainst/#findComment-288452 Share on other sites More sharing options...
Wildbug Posted July 3, 2007 Share Posted July 3, 2007 Yeah, the table. I don't think there's any problem. It's the boolean mode that is giving you the integers. Try removing that and see the floats. Quote Link to comment https://forums.phpfreaks.com/topic/58120-solved-fulltext-indexing-and-matchagainst/#findComment-288759 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.