两种安装方式

1、use elasticsearch-plugin to install
docker exec -it elasticsearch /bin/sh
cd bin/
elasticsearch-plugin install https://github.com/medcl/elasticsearch-analysis-ik/releases/download/v7.1.1/elasticsearch-analysis-ik-7.1.1.zip
执行完毕后
elasticsearch-plugin list #查看
elasticsearch-plugin remove analysis-ik #删除
2、download 插件
docker exec -it elasticsearch /bin/sh
cd plugins && mkdir ik
wget https://github.com/medcl/elasticsearch-analysis-ik/releases/download/v7.1.1/elasticsearch-analysis-ik-7.1.1.zip
unzip elasticsearch-analysis-ik-7.1.1.zip

安装完成后重启服务

增加分词
docker exec -it elasticsearch /bin/sh
cd config/analysis-ik/
echo '济南彭于晏' >> main.dic

参考链接

https://github.com/medcl/elasticsearch-analysis-ik
https://github.com/yeszao/dnmp