无法找到与列列表匹配的FULLTEXT索引

时间:2014-10-03 16:28:19

标签: mysql full-text-search

我尝试过全文索引每个列,如下所示:

ALTER TABLE AHF_orders ADD FULLTEXT(customer_fname);
ALTER TABLE AHF_orders ADD FULLTEXT(customer_lname);
ALTER TABLE AHF_orders ADD FULLTEXT(customer_address);

我还尝试将索引编组为:

ALTER TABLE AHF_orders ADD FULLTEXT indexName (customer_fname, customer_lname, customer_address);

然后我使用这个Mysql查询:

(SELECT customer_fname, customer_lname, customer_address FROM AHF_orders WHERE MATCH (customer_fname, customer_lname, customer_address) AGAINST ('smith'))

我仍然明白这一点:

Can't find FULLTEXT index matching the column list

我还想补充一点,这个查询有效:

(SELECT customer_fname, customer_lname, customer_email FROM AHF_orders WHERE MATCH (customer_fname) AGAINST ('george smith'))

但我不想只针对一列搜索匹配,我需要做多个。谢谢 !

1 个答案:

答案 0 :(得分:0)

CREATE FULLTEXT INDEX keysearch
ON tpm_items (name)

上面的代码为我工作。我只全文索引一列。但是,我不确定如何将组全文索引添加到评论中其他人提到的其他列。