匹配,按相关性排序

时间:2013-03-05 13:07:43

标签: mysql full-text-search

我的查询

$query = selectQuery('SELECT * FROM page_info WHERE MATCH(content) 
           AGAINST("reactie klanten" WITH QUERY EXPANSION)');

我如何按相关性排序?我回来了大约10行,但实际上包含“reactie”和“klanten”字样的行位于中间位置。其余的结果与单词:S

有某种关联

MySQL documentation about 'WITH QUERY EXPANSION'

修改
通过查询更改为:

SELECT *, MATCH(content) AGAINST("reactie klanten") AS relevance FROM page_info WHERE MATCH(content) AGAINST("reactie klanten" WITH QUERY EXPANSION) ORDER BY relevance DESC

这看起来很有希望,因为现在该领域位于榜单之上。

其他人如何相关?

示例:

 $text  = This page is being tested by our tester  

$ text如何与reactie klanten相关?

0 个答案:

没有答案