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. Link to comment https://forums.phpfreaks.com/topic/109407-order-results-by-relevance/ 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. Link to comment https://forums.phpfreaks.com/topic/109407-order-results-by-relevance/#findComment-562392 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.