今天上线了一个日文项目,项目中使用到了RDS Mysql的全文索引服务,当所有所有准备好测试时发现,RDS的innodb_ft_min_token_size参数默认配置是3个字, 有很2个字的词就没有结果了,所以只能修改RDS的参数组配置来实现了。
innodb_ft_min_token_size: "Minimum length of words that are stored in an InnoDB FULLTEXT index."
下面简单说一下配置:
1. 参数组中的default.mysql56是不允许修改的
2. 新建一个参数组出来,然后修改需要自己定义的参数
3. 编辑实例,修改参数组,最下面选中“立即生效”
4. 回到实例,显示等待重启时,重启实例
注意: 如果动态的参数,不需要重启实例, 如果是静态实例需要重启实例(不幸的是,我这次改的是静态参数)
为了测试重启花费的时间写了个小程序检查链接,最终花了20秒完成,如下参考:
2015-11-12 08:51:08 2015-11-12 08:51:09 2015-11-12 08:51:10 2015-11-12 08:51:11 2015-11-12 08:51:12 Connection failed: SQLSTATE[HY000] [2002] Connection refused2015-11-12 08:51:13 Connection failed: SQLSTATE[HY000] [2002] Connection refused2015-11-12 08:51:14 Connection failed: SQLSTATE[HY000] [2002] Connection refused2015-11-12 08:51:15 Connection failed: SQLSTATE[HY000] [2002] Connection refused2015-11-12 08:51:16 Connection failed: SQLSTATE[HY000] [2002] Connection refused2015-11-12 08:51:17 Connection failed: SQLSTATE[HY000] [2002] Connection refused2015-11-12 08:51:18 Connection failed: SQLSTATE[HY000] [2002] Connection refused2015-11-12 08:51:19 Connection failed: SQLSTATE[HY000] [2002] Connection refused2015-11-12 08:51:20 Connection failed: SQLSTATE[HY000] [2002] Connection refused2015-11-12 08:51:21 Connection failed: SQLSTATE[HY000] [2002] Connection refused2015-11-12 08:51:22 Connection failed: SQLSTATE[HY000] [2002] Connection refused2015-11-12 08:51:23 Connection failed: SQLSTATE[HY000] [2002] Connection refused2015-11-12 08:51:24 Connection failed: SQLSTATE[HY000] [2002] Connection refused2015-11-12 08:51:25 Connection failed: SQLSTATE[HY000] [2002] Connection refused2015-11-12 08:51:26 Connection failed: SQLSTATE[HY000] [2002] Connection refused2015-11-12 08:51:27 Connection failed: SQLSTATE[HY000] [2002] Connection refused2015-11-12 08:51:28 Connection failed: SQLSTATE[HY000] [2002] Connection refused2015-11-12 08:51:29 Connection failed: SQLSTATE[HY000] [2002] Connection refused2015-11-12 08:51:30 Connection failed: SQLSTATE[HY000] [2002] Connection refused2015-11-12 08:51:31 Connection failed: SQLSTATE[HY000] [2002] Connection refused2015-11-12 08:51:32 Connection failed: SQLSTATE[HY000] [2002] Connection refused2015-11-12 08:51:33 Connection failed: SQLSTATE[HY000] [2002] Connection refused2015-11-12 08:51:34 Connection failed: SQLSTATE[HY000] [2002] Connection refused2015-11-12 08:51:35 Connection failed: SQLSTATE[HY000] [2002] Connection refused2015-11-12 08:51:36 Connection failed: SQLSTATE[HY000] [2002] Connection refused2015-11-12 08:51:37 Connection failed: SQLSTATE[HY000] [2002] Connection refused2015-11-12 08:51:38 Connection failed: SQLSTATE[HY000] [2002] Connection refused2015-11-12 08:51:39 2015-11-12 08:51:40 2015-11-12 08:51:41 2015-11-12 08:51:42
更多文档参考: http://docs.aws.amazon.com/zh_cn/AmazonRDS/latest/UserGuide/USER_WorkingWithParamGroups.html
日文分词参考: http://blog.hexu.org/archives/738.shtml