select (if(LOCATE('tomcat',notetitle),1,0)+ if(LOCATE('nginx',notetitle),1,0)+if(LOCATE('linux',notetitle),1,0))
as score,notetitle from technicalnote
where notetitle like'%tomcat%' or notetitle like '%nginx%' or notetitle like '%linux%' order by score desc
mysql分词查询并根据关键词匹配度进行排序
最新推荐文章于 2024-06-28 10:39:34 发布