mysql MATCH relavancy score
MySQL Documentation Under Natural Language Full-Text Searches

Paragraph 1


  By default or with the IN NATURAL LANGUAGE MODE modifier, the MATCH() function performs a natural language search for a string against a text collection. A collection is a set of one or more columns included in a FULLTEXT index. The search string is given as the argument to AGAINST(). *For each row in the table, **MATCH() returns a relevance value; that is, a similarity measure between the search string and the text in that row in the columns named in the MATCH() list***.


Paragraph 3


  When MATCH() is used in a WHERE clause, as in the example shown earlier, the rows returned are automatically sorted with the highest relevance first. Relevance values are nonnegative floating-point numbers. Zero relevance means no similarity. Relevance is computed based on the number of words in the row, the number of unique words in that row, the total number of words in the collection, and the number of documents (rows) that contain a particular word.


When doing Boolean Searches, MATCH() will return 0 or 1.

NOTE TO MyISAM USERS

You can use the myisam_ftdump utility against the MyISAM table to get a complete listing of words and their frequency.

NOTE TO InnoDB USERS

There is a wonderful explanation of how InnoDB calculates Relevance in Boolean Fulltext Searching under the subheading Relevancy Rankings for InnoDB Boolean Mode Search in the MySQL Documentation (Boolean Full-Text Searches)