gpt4 book ai didi

MySQL 全文搜索没有匹配项

转载 作者:行者123 更新时间:2023-11-29 13:54:03 26 4
gpt4 key购买 nike

<小时/>

有这张表:

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/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com