发布网友 发布时间:2022-04-30 23:20
共2个回答
懂视网 时间:2022-05-01 03:41
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-05-01 00:49
这个搜索的结果为空,原因是单词 “MySQL” 出现在至少全文的50%的行中。 因此, 它被列入停止字。对于大型数据集,使用这个操作最合适不过了----一个自然语言问询不会从一个1GB 的表每隔一行返回一次。对于小型数据集,它的用处可能比较小。