The Little Guy Posted June 9, 2008 Share Posted June 9, 2008 I have this search query (works): $query = "SELECT SQL_CALC_FOUND_ROWS * FROM lyrics WHERE MATCH(lyric,title,album,artist) AGAINST ('%$q%' IN BOOLEAN MODE) LIMIT $limitvalue, $limit"; I want to modify the query, so the more relevant results are first, and less relevant results are last. but I would like the weight to be like this: -title -artist -album -lyric by weight I mean relevance. 100% weighs more than 20% relevance. Quote Link to comment Share on other sites More sharing options...
fenway Posted June 10, 2008 Share Posted June 10, 2008 You can order by MATCH..AGAINST... too -- otherwise, you'll need to roll-your-own weighting algorithm. 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.