一、安装
1、拉取镜像
docker pull elasticsearch:7.13.4
2、运行容器
docker run --name elasticsearch -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" -e ES_JAVA_OPTS="-Xms64m -Xmx128m" -v D:\environment\elasticsearch-7.13.4\config:/usr/share/elasticsearch/config -v D:\environment\elasticsearch-7.13.4\data:/usr/share/elasticsearch/data -v D:\environment\elasticsearch-7.13.4\plugins:/usr/share/elasticsearch/plugins -d elasticsearch:7.13.4
3、在主机使用localhost:9200访问时无法打开页面,解决方法:
在elasticsearch.yml中修改network.host
#监听地址
network.host: 0.0.0.0
二、插件
1、中文分词器
./bin/elasticsearch-plugin install https://github.com/medcl/elasticsearch-analysis-ik/releases/download/v7.13.4/elasticsearch-analysis-ik-7.13.4.zip