开发者

Trying to understand "Can't find FULLTEXT index matching the column list" error

As I'm trying to understand SQL by playing around with the code a bit, I have run 开发者_Python百科into this situation. I run this code

SELECT * FROM jobs WHERE MATCH ( title, location, description ) AGAINST ( 'New York designer')

and I get the right row results. However, if I ask myself, "okay so what if I want just look at one column?"

 SELECT * FROM  jobs WHERE  match(location) against ('designer')

I get the error "Can't find FULLTEXT index matching the column list". Why? I'm not sure what this error means. I just remove two words and commas.

I alter the jobs table to use the MyISAM engine. Does that mean it's searchable or "FULLTEXT"? Since InnoDB isn't searchable, is that correct to say?

But now, when isolated to searching to one column, it's a problem?

Let me know if this makes sense, I will re-edit.


FULLTEXT indexes are a feature of the MyISAM storage engine.

You can't match against the location column unless there is a FULLTEXT index on that column alone.

The MATCH() column list must match exactly the column list in some FULLTEXT index definition for the table, unless this MATCH() is IN BOOLEAN MODE. Boolean-mode searches can be done on nonindexed columns, although they are likely to be slow.

http://dev.mysql.com/doc/refman/5.0/en/fulltext-restrictions.html


when everything was right and still got this error i found that the KEYS were disabled ..

make sure u have enabled the keys on that table

it didn't work for me when i had disabled the keys ...

i enabled the keys " ALTER TABLE table name ENABLE KEYS;

and it worked fine

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜