1 分词插件的选择
ES内部已经自带了支持中文的分词器 不过实在是太烂了
这里我们选择IK中文分词器
https://github.com/medcl/elasticsearch-analysis-ik
IK版本选择 ES对应的IK版本
IK version | ES version |
---|---|
master | 7.x -> master |
6.x | 6.x |
5.x | 5.x |
1.10.6 | 2.4.6 |
1.9.5 | 2.3.5 |
1.8.1 | 2.2.1 |
1.7.0 | 2.1.1 |
1.5.0 | 2.0.0 |
1.2.6 | 1.0.0 |
1.2.5 | 0.90.x |
1.1.3 | 0.20.x |
1.0.0 | 0.16.2 -> 0.19.0 |
安装方式
1 手动安装 用java的maven 这里不介绍
2 利用es的plugin工具:
./bin/elasticsearch-plugin install https://github.com/medcl/elasticsearch-analysis-ik/releases/download/v6.3.0/elasticsearch-analysis-ik-6.3.0.zip
3 自己下载
下载好之后在/plugin下面创建一个ik目录 把上面下载的压缩包里面的内容解压复制到里面
重启ES
出现加载IK就是成功了