我这样做一个查询
SELECT * FROM . WHERE MATCH(title,text) AGAINST ('word1') LIMIT 100
现在,coure title比文本更重要。有没有办法告诉mysql如果在标题中找到word1而不是文本,它应该给予更多的启示?
由于
答案 0 :(得分:1)
这应该做到但它似乎有点笨重
SELECT * FROM
(SELECT * FROM WHERE
MATCH(title) AGAINST ('word1')
UNION
SELECT * FROM WHERE
MATCH(text) AGAINST ('word1')
) t
LIMIT 100