mysql结果以字符串显示不出来,mysql – 为什么SQl MATCH AGAINST找不到结果中只有3个字符的结果?...
例如,我正在搜索姓Ash的人,所以在我的查詢中我搜索Ash.它將向我展示Ashley,Ashby等姓氏的人……但不會告訴我姓Ash的姓氏
這是我的sql的樣子:
SELECT * FROM `People`
WHERE MATCH(PersonFirstName, PersonLastName) AGAINST('ash*' IN BOOLEAN MODE) LIMIT 20
是否有某種規則,它必須超過3個字符或什么,以便MATCH AGAINST找到它?
解決方法:
請參閱系統變量ft_min_word_len,它指定通過全文搜索索引的最小單詞長度.默認為4,因此全文搜索無法找到3個字母的單詞.有關全文搜索參數的更多信息,請訪問12.9.6. Fine-Tuning MySQL Full-Text Search.該頁面說明:
For example, if you want three-character words to be searchable, you can set the ft_min_word_len variable by putting the following lines in an option file:
[mysqld]
ft_min_word_len=3
Then restart the server and rebuild your FULLTEXT indexes. Note particularly the remarks regarding myisamchk in the instructions following this list.
標簽:mysql,database,sql,match
來源: https://codeday.me/bug/20190529/1177452.html
總結
以上是生活随笔為你收集整理的mysql结果以字符串显示不出来,mysql – 为什么SQl MATCH AGAINST找不到结果中只有3个字符的结果?...的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 培训班激励精神口号文案大全30句
- 下一篇: mysql存储过程into_MySQL存