环境:docker里
安装icu
- 进入docker容器内
docker exec -it es sh
说明:es是我创建容器时候定义的container_name,也可以通过docker ps查看container_id,通过id进入
- 安装插件
bin/elasticsearchplugin install analysis-icu
- 测试使用
在kibana内,使用开发者工具
GET _analyze
{
"analyzer": "icu_analyzer",
"text": "也可以使用如下docker-compose.yml启动"
}
运行结果

image.png
安装ik分析器
先从github上找到和es匹配的版本:https://github.com/medcl/elasticsearch-analysis-ik
- 进入docker容器内
docker exec -it es sh
说明:es是我创建容器时候定义的container_name,也可以通过docker ps查看container_id,通过id进入
- 安装插件
bin/elasticsearchplugin install https://github.com/medcl/elasticsearch-analysis-ik/releases/download/v7.1.0/elasticsearch-analysis-ik-7.1.0.zip
-
测试使用
在kibana内,使用开发者工具
image.png
