Mysql分词查询排序
SELECT words FROM `tbresearch_list` where keywords = 30 AND words REGEXP 'energy|sulfur|fluoride' ORDER BY ( CHAR_LENGTH(words) - CHAR_LENGTH(REPLACE(words, 'a b c', '')) ) / 5 DESC, ( CHAR_LENGTH(words) - CHAR_LENGTH(REPLACE(words, 'a', '')) ) / 1 + ( CHAR_LENGTH(words) - CHAR_LENGTH(REPLACE(words, 'b', '')) ) / 1 + ( CHAR_LENGTH(words) - CHAR_LENGTH(REPLACE(words, 'c', '')) ) / 1 DESC