gpt4 book ai didi

mysql - My SQL全文搜索在搜索多列时出错

转载 作者:行者123 更新时间:2023-11-29 20:40:37 25 4
gpt4 key购买 nike

我在我的问题数据库附加图像中使用以下查询: enter image description here

SELECT *, MATCH(question,short_answer,long_answer) AGAINST('transmission impairment') AS Score
FROM questions
WHERE MATCH(question,short_answer,long_answer) AGAINST('transmission impairment')
ORDER BY score DESC;

我收到以下错误 enter image description here :

最佳答案

以下代码对我有用:

SELECT *, MATCH(long_answer) AGAINST('guided media') AS Score FROM questions WHERE id IN (SELECT id FROM questions WHERE MATCH(long_answer) AGAINST('guided media') UNION SELECT id FROM questions WHERE MATCH(question) AGAINST('guided media') ) ORDER BY score DESC

我仍然不认为这是最佳解决方案

关于mysql - My SQL全文搜索在搜索多列时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38654226/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com