sql查询后需要根据匹配度降序排列显示
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