The Little Guy Posted December 22, 2009 Share Posted December 22, 2009 Hmmm... I am having an issue... SELECT * FROM `questions` q LEFT JOIN `categories` c ON (q.category = c.id) WHERE MATCH(q.`question`) AGAINST ('$q' IN BOOLEAN MODE) I have 2 similar rows: - What does HTML stand for? - What does DNA stand for? When I run the above query where $q = 'What does DNA stand for?' It says the best row result is the 'What does HTML stand for?' row, why is it choosing the first row, when the second row is the EXACT same thing as the query string and the first row is not? Quote Link to comment https://forums.phpfreaks.com/topic/185985-relevance-is-wrong/ Share on other sites More sharing options...
fenway Posted December 22, 2009 Share Posted December 22, 2009 How many rows total? Quote Link to comment https://forums.phpfreaks.com/topic/185985-relevance-is-wrong/#findComment-982124 Share on other sites More sharing options...
The Little Guy Posted December 22, 2009 Author Share Posted December 22, 2009 In the whole table, there are currently 3 rows, but in the returned results there is only 2. Quote Link to comment https://forums.phpfreaks.com/topic/185985-relevance-is-wrong/#findComment-982131 Share on other sites More sharing options...
fenway Posted December 22, 2009 Share Posted December 22, 2009 FULLTEXT will return nonsense unless 50% of the rows have matches. Quote Link to comment https://forums.phpfreaks.com/topic/185985-relevance-is-wrong/#findComment-982535 Share on other sites More sharing options...
The Little Guy Posted December 23, 2009 Author Share Posted December 23, 2009 There we go! I just removed "IN BOOLEAN MODE" and it worked Quote Link to comment https://forums.phpfreaks.com/topic/185985-relevance-is-wrong/#findComment-982836 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.