MySQL全文搜索两列

MySQL全文搜索两列,mysql,full-text-search,Mysql,Full Text Search,我试图只使用SQL创建一个搜索函数,但现在我只得到内容中匹配的结果。如果一篇文章的标题与searchstring匹配,它将被忽略,但我不明白为什么 SELECT title, LEFT(content, 200) as content, MATCH(title, content) AGAINST (:searchstr) AS score FROM table WHERE MATCH(title, content) AGAINST(:searchstr IN BOOLEAN MODE) ORDE

我试图只使用SQL创建一个搜索函数,但现在我只得到内容中匹配的结果。如果一篇文章的标题与searchstring匹配,它将被忽略,但我不明白为什么

SELECT title, LEFT(content, 200) as content, MATCH(title, content) AGAINST (:searchstr) AS score
FROM table
WHERE MATCH(title, content) AGAINST(:searchstr IN BOOLEAN MODE) ORDER BY score DESC
如果标题与搜索字符串匹配,它应该获得更高的分数以首先显示标题匹配,因为它们应该更相关。。。我该怎么做呢?

我在这里找到了一个解决方案: