docker pull elasticsearch:7.13.0
docker network create elastic
docker run --name elasticsearch --net elastic -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" -t elasticsearch:7.13.0
好像不带ik的分词,所以还需要安装下
docker exec -it elasticsearch /bin/bash
wget https://github.com/medcl/elasticsearch-analysis-ik/releases/download/v7.13.0/elasticsearch-analysis-ik-7.13.0.zip
unzip 下载的文件
rm –rf *.zip
mv elasticsearch/ /usr/share/elasticsearch/plugins/ik
可以确认是否安装好了分词器
cd /usr/share/elasticsearch/bin
elasticsearch-plugin list
即可列出系统的分词器
然后重启elasticsearch
docker restart elasticsearch
参考:https://cloud.tencent.com/developer/article/2139072
然后就可以创建mapping了
标签:bin,9200,7.13,ik,elasticsearch,使用,docker,es From: https://www.cnblogs.com/dmesg/p/17967584