美文网首页
全文索引fulltext

全文索引fulltext

作者: 好小葱1 | 来源:发表于2019-04-04 11:45 被阅读0次
-- 创建索引
alter table add index `full_text_idx` on tablename (`column_name`);

-- 类似like的查询
select * from course_comment where MATCH(content) AGAINST ('太棒了' IN NATURAL LANGUAGE MODE);

-- 包含County或Down的查询
MATCH(name) AGAINST('+County +Down' IN BOOLEAN MODE)

相关文章

网友评论

      本文标题:全文索引fulltext

      本文链接:https://www.haomeiwen.com/subject/mxjfiqtx.html