<小时/>
有这张表:
CREATE TABLE search (
`uid_search` INT(15) NOT NULL auto_increment,
`uid` INT(11),
`type` VARCHAR(30),
`strings` TEXT,
UNIQUE (uid,type),
PRIMARY KEY (uid_search),
FULLTEXT (strings) ) ENGINE=MyISAM
DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci
并插入此数据:
INSERT INTO `search` (`uid_search`, `uid`, `type`, `strings`)
VALUES (1, 2, 'doc', 'Formación Primeros Auxilios');
为什么这些查询都不匹配全文搜索?
SELECT uid、type、strings、MATCH(字符串)AGAINST('Formación' IN NATURAL LANGUAGE MODE)作为 FROM 搜索的匹配项
选择 uid、类型、字符串、MATCH(字符串)AGAINST(在自然语言模式下转换(_utf8'Formación' USING latin1))作为 FROM agd_tmp.search 的匹配
我认为 UTF8 有问题。
最佳答案
引用manual :
In addition, words that are present in 50% or more of the rows are considered common and do not match.
您需要在表中插入更多行。
关于MySQL 全文搜索没有匹配项,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16168426/