Solved

# Rank range for Match Against

Posted on 2006-04-03
297 Views
I have a select statement that returns the rank of a search term.

select ititle, ifullurl, idesc, icontent, MATCH (ititle, icontent) AGAINST ('industrial automation') as rank from ff_index where (MATCH (ititle, icontent) AGAINST('industrial') AND MATCH (ititle, icontent) AGAINST('automation')) order by rank desc LIMIT 0, 20

Can someone tell me what the range is for the rank? I have seen it get above 6 so I would assume that it is from 0 to 10. Can someone verify that for me? Thanks.
0
Question by:rbichon

LVL 142

Accepted Solution

http://dev.mysql.com/doc/refman/5.0/en/fulltext-search.html
<...>
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.
<...>
0

LVL 1

Author Comment

Ok. So you are saying that there is no max value for the rank/relevance?
0

LVL 142

Expert Comment

correct. the more words in the collection correspond to a word in the row, the higher the value. the less words in the row, the higher the value...
0

LVL 1

Author Comment

I guess then I will just calculate a relevancy percentage for each record using the maximum value in the index. Thanks for your help.
0

## Featured Post

### Suggested Solutions

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
Both Easy and Powerful How easy is PHP? http://lmgtfy.com?q=how+easy+is+php (http://lmgtfy.com?q=how+easy+is+php)  Very easy.  It has been described as "a programming language even my grandmother can use." How powerful is PHP?  http://en.wikiped…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…