邢栋博客

邢栋博客,Action博客,记录工作和生活中的点点滴滴

docker安装es的中文分词器ik插件


es-ik.png

===两种安装方式===

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




优惠券
最新微语