oz11 Posted September 13, 2022 Share Posted September 13, 2022 I'm trying to get this query to list the results in an order that when searching using two terms, the response will be that those at the top are the "best match". For example, the query for 'google news' , at the moment, does not return Google to the top but actually other keyword/rows containing "news". See, Google is at the bottom when i would like it to be near the top, as its a "better match" then the others. Help me with this head scratching situation people please.. SELECT * FROM links, link_word, keywords WHERE links.link_id = link_word.link_id AND link_word.key_id = keywords.key_id AND MATCH(word) AGAINST('google news') OR MATCH(title) Against('"-google news"') GROUP BY title thanks, Oz. Quote Link to comment Share on other sites More sharing options...
oz11 Posted September 14, 2022 Author Share Posted September 14, 2022 (edited) Quick update. I swapped the database around and changed the query abit. Still have the same problem though. :S SELECT * FROM links, bridge, keywords WHERE links.links_id = bridge.link_id AND bridge.keyw_id = keywords.keyw_id AND MATCH(description) AGAINST('google news') AND MATCH(terms) AGAINST('google NEWS') OR MATCH(title) AGAINST('google NEWS') GROUP BY title New screenshot: Edited September 14, 2022 by oz11 Quote Link to comment Share on other sites More sharing options...
morocco-iceberg Posted October 2, 2022 Share Posted October 2, 2022 If it's consistently coming out in reverse order for your expected results, you could always try 'ORDER BY attribute DESC' Quote Link to comment 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.