Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FullText Relevance not sorting

Status
Not open for further replies.

leegold2

Technical User
Oct 10, 2004
116
Given the SQL shouldn't the records be sorting by score ie. relevance? I thought if "WHERE MATCH" is used it will sort that way. Thanks

mysql> SELECT `page`.`title` , MATCH ( `title` , `descrip` ) AGAINST ( '+code+nasdac' IN BOOLEAN MODE ) AS SCORE FROM `page` WHERE MATCH ( `title` , `descrip` ) AGAINST ( '+code+nasdac' IN BOOLEAN MODE );
+---------------------------------------------+-----------------+
| title | SCORE |
+---------------------------------------------+-----------------+
| Code 99 Specifications | 1.3333333730698 |
| Centralized Management System | 1 |
| Report Number Series | 1.3333333730698 |
| Reviewing Documents for Release | 1 |
+---------------------------------------------+-----------------+
4 rows in set (0.00 sec)

mysql>

 
If you want the results in any particular order, you have to use an ORDER BY clause, in this case "ORDER BY score".
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top