1.在线安装
进入es容器:docker exec -it 93f4910a42d7 bash
在线下载并安装ik:
./bin/elasticsearch-plugin install https://github.com/medcl/elasticsearch-analysis-ik/releases/download/v6.6.2/elasticsearch-analysis-ik-6.6.2.zip
docker restart 93f4910a42d7
2.离线安装
(1)https://github.com/medcl/elasticsearch-analysis-ik/releases/download/v6.6.2/elasticsearch-analysis-ik-6.6.2.zip下载ik放到/home/kwz/plugins目录中
(2)复制zip到es容器目录:docker cp elasticsearch-analysis-ik-6.6.2.zip 93f4910a42d7:/usr/share/elasticsearch/plugins
(3)在容器目录里对ik解压
(4)docker restart 93f4910a42d7