我正在使用此查询在表内搜索:
SELECT
*,
MATCH(tags,title,description)
AGAINST ('hey you are you in' IN BOOLEAN MODE) AS score
FROM table
ORDER BY insert_datetime DESC, id DESC
我需要的是使用别名'score'来排序结果,这是正确的sintax吗?:
SELECT
*,
MATCH(tags,title,description)
AGAINST ('hey you are you in' IN BOOLEAN MODE) AS score
FROM table
ORDER BY score DESC, insert_datetime DESC, id DESC
反正还有优化这个查询吗?更好的写法?