Elasticsearch安装IK分词器(联网+离线)

1、在线联网安装

      直接进入容器内部进行编辑

# 进入容器内部编辑,或者在Elasticsearch下的bin目录下执行elasticsearch-plugin
docker exec -it  elasticsearch bash

# 安装IK分词器插件(Github官网)
elasticsearch-plugin install https://github.com/medcl/elasticsearch-analysis-ik/releases/download/v6.7.0/elasticsearch-analysis-ik-6.7.0.zip

# 或者加速下载(第三方加速)
elasticsearch-plugin install https://github.91chifun.workers.dev//https://github.com/medcl/elasticsearch-analysis-ik/releases/download/v6.7.0/elasticsearch-analysis-ik-6.7.0.zip

      等待下载完成然后cd,然后查看是否有ik分词器

cd plugins/
ls

      如果有ik分词器则安装完成,然后重新启动es然后访问

2、离线安装

      首先下载,然后解压,如果不是容器方式安装直接解压plugins目录即可

# 下载
wget https://github.com/medcl/elasticsearch-analysis-ik/releases/download/v6.7.0/elasticsearch-analysis-ik-6.7.0.zip

# 加速
wget https://github.91chifun.workers.dev//https://github.com/medcl/elasticsearch-analysis-ik/releases/download/v6.7.0/elasticsearch-analysis-ik-6.7.0.zip

# 解压
m

你可能感兴趣的:(elasticsearch,docker)