发布网友 发布时间:2022-04-08 22:22
共2个回答
懂视网 时间:2022-04-09 02:44
TABLE `T` ( .... FULLTEXT KEY `title_fc` (`titleindex`), FULLTEXT KEY `shortname_fc` (`shortnameindex`) ) ENGINE=InnoDB AUTO_INCREMENT=50962041 DEFAULT CHARSET=utf8创建了两个全文索引,但是在查找的时候,却出现如下这样的错误。
mysql> SELECT count(1) as count FROM T a WHERE 1 = 1 AND MATCH (a.titleindex) AGAINST (‘"5YeM 5Yqo"‘ IN BOOLEAN MODE ); +-------+ | count | +-------+ | 70 | +-------+ 1 row in set (0.01 sec) mysql> SELECT count(1) as count FROM T a WHERE 1 = 1 AND MATCH (a.shortnameindex) AGAINST (‘"5YeM 5Yqo"‘ IN BOOLEAN MODE ) ; +-------+ | count | +-------+ | 6 | +-------+ 1 row in set (0.00 sec) mysql> SELECT count(1) as count FROM T a WHERE 1 = 1 AND MATCH (a.shortnameindex ,a.titleindex) AGAINST (‘"5YeM 5Yqo"‘ IN BOOLEAN MODE ) ; ERROR 1191 (HY000): Can‘t find FULLTEXT index matching the column list
单独match某一列可以正常查询,但是match多列就报错。
后来从MySQL的文档上面找到: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 on a MyISAM table.
【mysql】全文索引match多列报错
标签:
热心网友 时间:2022-04-08 23:52
目前,MySQL全文检索不支持中文和日文。追问我可以确定目前 MySQL全文检索支持中文和日文。