布尔模式下的MySQL全文与单词不匹配(不是不合格的单词)

vfhzx4xs  于 2023-01-20  发布在  Mysql
关注(0)|答案(1)|浏览(125)

MySQL全文搜索无法将单词'christoffer82'及其同类与词根单词'christo'匹配,我不知道为什么。这个登录名只在表中出现过一次(出现在50%以上的结果中),它甚至不是一个排除词。
挪威

SELECT
    usr.ID_USER AS userId
    , usr.USER_LOGIN AS userLogin
    , usr.EMAIL AS email
    , usr.MOBILE_PHONE AS mobilePhone
    , usr.FIRSTNAME AS firstName
    , usr.SURNAME AS surname
    , usr.USER_CREATED AS userCreated
    , usr.DATE_CREATED AS dateCreated
    , usr.USER_MODIFIED AS userModified
    , usr.DATE_MODIFIED AS dateModified
FROM
    BDT_USERS_DUMMY usr
WHERE 
    MATCH (usr.USER_LOGIN) AGAINST ('+christoffer82' IN BOOLEAN MODE)

好的

SELECT
    usr.ID_USER AS userId
    , usr.USER_LOGIN AS userLogin
    , usr.EMAIL AS email
    , usr.MOBILE_PHONE AS mobilePhone
    , usr.FIRSTNAME AS firstName
    , usr.SURNAME AS surname
    , usr.USER_CREATED AS userCreated
    , usr.DATE_CREATED AS dateCreated
    , usr.USER_MODIFIED AS userModified
    , usr.DATE_MODIFIED AS dateModified
FROM
    BDT_USERS_DUMMY usr
WHERE 
    MATCH (usr.USER_LOGIN) AGAINST ('+johan84' IN BOOLEAN MODE)

我试了所有能找到的stackOverflow

sd2nnvve

sd2nnvve1#

解决了。问题真的在我的服务器上,全文可以工作:)
my.ini

increase => innodb_ft_max_token_size=50
add => innodb_ft_num_word_optimize=5000
add => innodb_ft_sort_pll_degree=10

并重建索引

相关问题