- If you use one word in your search, 1 is a probable score, because all the results that appear have the same relevance (they all contain that word!). - If you use two words, where the second isn't present in all results, you shouldn't get relevance value 1 in all results. - If you use the example query (+orange -fruit) it's also natural that the relevance value is 1, because it's a very strict query.
If you go to my site (imikalsen.com), and try the internal search engine, you will see a practical application of the query. On the site, the result with the highest relevance value is always given 100% relevance. The relative relevance is calculated from the relevance the other results have compared to the most relevant. There might not be a linear relationship between the relevance values, but for my use it's enough. Try searching for: mikalsen (all 100% - relevance value = 2) Try searching for: mikalsen remi (different values) 100% is for the results that include remi AND mikalsen, the rest get 50% I checked the query I sent you, and it works the way I wrote it. If you are looking for more advanced relevance values (higher relevance if a word appears many times in a certain text, etc.) I'm not sure if I can help you. Remi Mikalsen E-Mail: [EMAIL PROTECTED] URL: http://www.iMikalsen.com On 5 Oct 2004 at 12:42, Ed Lazor wrote: > > -----Original Message----- > > Try this: > > > > select column1, match(column1) against ('+orange -fruit' IN BOOLEAN MODE) > > as score > > from some_table where match(column1) against('+orange -fruit' IN BOOLEAN > > MODE) > > order by score desc > > > > this way you have your results ordered by relevance, and you also get the > > relevance value in > > the result if you want to. > > Looks interesting. I'm not sure if it's working. I'm looking at the > results of running the query manually against the database and every record > in the result set has a score value of 1. Is that the way it should be? > > -Ed -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]
