我有一个奇怪的问题:MySQL(MySQL-5.1.61,PHP/5.2.17)全文搜索不适用于单词“asus”。我有产品表:MySQL全文搜索不适用于特定单词
CREATE TABLE IF NOT EXISTS product (
pid int unsigned NOT NULL AUTO_INCREMENT,
vendor text NOT NULL,
series text NOT NULL,
PRIMARY KEY (pid),
FULLTEXT KEY search (vendor,series)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;
而一些值:
INSERT INTO product (vendor,series) VALUES ('Apple','iPad');
INSERT INTO product (vendor,series) VALUES ('Asus','Eee Slate');
INSERT INTO product (vendor,series) VALUES ('Asus','Nexus 7');
INSERT INTO product (vendor,series) VALUES ('Sony','Xperia Tablet Z');
当我查询
SELECT * FROM product WHERE MATCH (vendor,series) AGAINST ('Sony');
它工作正常,但是当字段为 '华硕' 或“华硕的它不没有工作。我已经设置了ft_stopword_file =“”并重新创建数据库 - 没有任何改变。最小长度是4,所以我真的不知道什么是错的。
难道是一些奇怪的错误? “As”和“Us”都是停用词。 – wesside
停用词汇列表:https://dev.mysql.com/doc/refman/5.7/en/fulltext-stopwords.html – user2345998