MySQL 全文检索 FULLTEXT 搜索不到内容
MySQL 索引 全文检索 大约 447 字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
个。
- 在
my.ini
或my.cnf
的[mysqld]
下添加如下语句并重启MySQL
ft_min_word_len=1
- 快速重建表格(
repair
只适用于MyISAM
引擎)
repair table article quick;
中文检索
ft_min_word_len
是否已设置为1
。
阅读 3465 · 发布于 2019-04-04
————        END        ————
Give me a Star, Thanks:)
https://github.com/fendoudebb扫描下方二维码关注公众号和小程序↓↓↓
昵称:
随便看看
换一批
-
Gradle 生成 gradlew 设置版本及属性阅读 6235
-
Docker 前世今生阅读 2799
-
Spring Boot 返回值额外增加了一些字段阅读 637
-
OpenResty 中的正则匹配和替换阅读 8107
-
Spring Boot 使用 Java16 新特性 record 绑定配置文件属性阅读 810
-
Windows 后台启动 Nginx、Redis、MongoDB、php-fpm阅读 3179
-
IDEA 开发中常用的快捷键阅读 1482
-
Spring Boot Thymeleaf 获取 Bean 等容器中的对象阅读 313
-
OpenResty 中使用 ngx.location.capture 完成第三方接口请求阅读 10188
-
npm install --save 和 --save-dev 的区别阅读 1288