MySQL 全文检索 FULLTEXT 搜索不到内容

MySQL 索引 全文检索 About 447 words

FULLTEXT 索引

MySQL5.6版本起支持InnoDB引擎创建fulltext索引。

英文检索

查看全文检索配置:

SHOW VARIABLES LIKE 'ft%';

输出

Variable_name Value
ft_boolean_syntax + -><()~*:""&|
ft_max_word_len 84
ft_min_word_len 4
ft_query_expansion_limit 20
ft_stopword_file (built-in)

ft_min_word_len改为1,表示最小检索字符为1个。

  1. my.inimy.cnf[mysqld]下添加如下语句并重启MySQL
ft_min_word_len=1
  1. 快速重建表格(repair只适用于MyISAM引擎)
repair table article quick;

中文检索

ft_min_word_len是否已设置为1

Views: 3,602 · Posted: 2019-04-04

————        END        ————

Give me a Star, Thanks:)

https://github.com/fendoudebb/LiteNote

扫描下方二维码关注公众号和小程序↓↓↓

扫描下方二维码关注公众号和小程序↓↓↓


Today On History
Browsing Refresh