策码兄弟

mysql挖掘与探索------第2章 索引1-2 全文索引FULLTEXT

A 显示表的所有索引:

  show INDEX from phphi_article;

 

B删除索引:
alter table phphi_article drop INDEX fullwords;

 

C添加全文索引:

alter table phphi_article add  FULLTEXT co(content);

 

D使用全文索引:

1.直接使用

select id, title from phphi_article where MATCH(content,title) AGAINST('2014');

但是仅仅支持数字和字母。如果支持中文的话,需要 安装mysqlcft,

但是只有linux下的安装包、

 

 

posted @ 2014-04-10 11:43  策码秀才  阅读(144)  评论(0编辑  收藏  举报
策码兄弟