Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Rank range for Match Against

Posted on 2006-04-03
4
Medium Priority
?
306 Views
Last Modified: 2012-06-27
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
Comment
Question by:rbichon
  • 2
  • 2
4 Comments
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 500 total points
ID: 16359851
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

by:rbichon
ID: 16361125
Ok. So you are saying that there is no max value for the rank/relevance?
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 16361161
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

by:rbichon
ID: 16361512
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

Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows the steps required to install WordPress on Azure. Web Apps, Mobile Apps, API Apps, or Functions, in Azure all these run in an App Service plan. WordPress is no exception and requires an App Service Plan and Database to install
In this article, we’ll look at how to deploy ProxySQL.
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses
Course of the Month13 days, 15 hours left to enroll

581 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question