#1214-使用的表格类型不支持FULLTEXT索引 [英] #1214 - The used table type doesn't support FULLTEXT indexes
本文介绍了#1214-使用的表格类型不支持FULLTEXT索引的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我收到一条错误消息,说表类型不支持FULLTEXT索引.我该如何实现?
I'm getting an error saying that the table type doesn't support FULLTEXT indices. How can I achieve this?
这是我的桌子:
CREATE TABLE gamemech_chat (
id bigint(20) unsigned NOT NULL auto_increment,
from_userid varchar(50) NOT NULL default '0',
to_userid varchar(50) NOT NULL default '0',
text text NOT NULL,
systemtext text NOT NULL,
timestamp datetime NOT NULL default '0000-00-00 00:00:00',
chatroom bigint(20) NOT NULL default '0',
PRIMARY KEY (id),
KEY from_userid (from_userid),
FULLTEXT KEY from_userid_2 (from_userid),
KEY chatroom (chatroom),
KEY timestamp (timestamp)
) ;
*
推荐答案
MyISAM Engine仅仅支持MySQL 5.6全文搜索.
Before MySQL 5.6 Full-Text Search is supported only with MyISAM Engine.
因此将表的引擎更改为MyISAM
Therefore either change the engine for your table to MyISAM
CREATE TABLE gamemech_chat (
id bigint(20) unsigned NOT NULL auto_increment,
from_userid varchar(50) NOT NULL default '0',
to_userid varchar(50) NOT NULL default '0',
text text NOT NULL,
systemtext text NOT NULL,
timestamp datetime NOT NULL default '0000-00-00 00:00:00',
chatroom bigint(20) NOT NULL default '0',
PRIMARY KEY (id),
KEY from_userid (from_userid),
FULLTEXT KEY from_userid_2 (from_userid),
KEY chatroom (chatroom),
KEY timestamp (timestamp)
) ENGINE=MyISAM;
这里是 SQLFiddle 演示
Here is SQLFiddle demo
或升级到5.6并使用InnoDB全文搜索.
or upgrade to 5.6 and use InnoDB Full-Text Search.
这篇关于#1214-使用的表格类型不支持FULLTEXT索引的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文