Page 1 of 1

FULL INDEX not working, and this odd Error message

Posted: Mon Nov 16, 2015 3:14 am
by simonmlewis
We are trying to use FULL INDEX on a web site, but it's not working.
When I try to set full index on a field via mysql code, I get this message:

[text]#1214 - The used table type doesn't support FULLTEXT indexes[/text]
What does that mean. Have I set the table up wrong??

Re: FULL INDEX not working, and this odd Error message

Posted: Mon Nov 16, 2015 5:54 am
by Celauran
What table type are you using? What version of MySQL? What column type are you trying to set the index on?
Full-text indexes can be used only with MyISAM tables. (In MySQL 5.6 and up, they can also be used with InnoDB tables.) Full-text indexes can be created only for CHAR, VARCHAR, or TEXT columns.
https://dev.mysql.com/doc/refman/5.5/en/fulltext-search.html

Re: FULL INDEX not working, and this odd Error message

Posted: Mon Nov 16, 2015 6:02 am
by simonmlewis
How do I find out if the table is MyISAM? I've no idea. Never had this sort of issue before.

The field is VARCHAR.

Re: FULL INDEX not working, and this odd Error message

Posted: Mon Nov 16, 2015 6:08 am
by Celauran

Code: Select all

SHOW TABLE STATUS WHERE Name = 'table_name_here';

Re: FULL INDEX not working, and this odd Error message

Posted: Mon Nov 16, 2015 7:03 am
by simonmlewis
And what am I looking for in the result, as I don't see anything about MyISAM?

EDIT:
Got it. It's InnoDB.

Is this easy to change?

Re: FULL INDEX not working, and this odd Error message

Posted: Mon Nov 16, 2015 7:14 am
by simonmlewis
Cracked it. Found the fix. And it works. Cheers.