发布时间:2022-08-19 13:35
use test;
show variables like 'innodb_ft_min_token_size';
## innodb_ft_min_token_size 2
show variables like 'ft%';
## ft_min_word_len 1
REPAIR TABLE product;
show create table product;
CREATE TABLE `product` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`title` varchar(200) NOT NULL DEFAULT '' COMMENT '商品名称',
PRIMARY KEY (`id`),
FULLTEXT KEY `full_title` (`title`) with parser ngram
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8;
## 注意这里一定要用到 with parser ngram
alter table product add FULLTEXT KEY `full_title` (`title`) with parser ngram;
insert into product(title)values('青岛啤酒'),('雪花啤酒'),('哈尔滨啤酒'),('牛栏山二锅头'),('红星二锅头'),('are you ok?'),('how are you'),('how do you do'),('what are you doing now?'),('hello');
select * from product;
select * from product where match(title) against('you' In natural language mode);
select * from product where match(title) against('哈尔滨');
select * from product where match(title) against('"青岛"' IN BOOLEAN MODE);
## 重建索引
REPAIR TABLE product QUICK;
ALTER TABLE product ENGINE=INNODB;
OPTIMIZE TABLE product;
RSA算法解密 javax.crypto.BadPaddingException: Decryption error 异常
Python pandas DataFrame基础运算及空值填充详解
ubuntu18.04平台上基于xenomai3.2对Linux内核的实时化改造
Python3,听说这个第三方库竟碾压python自带JSON库。
高级程序员必知必会,一文详解MySQL主从同步原理,推荐收藏
Rxjs map, mergeMap 和 switchMap 的区别和联系
HC32L110(四) HC32L110的startup启动文件和ld连接脚本
数字经济高速发展,中小企业如何有效应对安全威胁? 中小企业如何实现数字化升级,7月20日腾讯安全专家在线分享防护之道