1 、安装教程
windows环境下elasticsearch安装教程(超详细) - hualess - 博客园 (cnblogs.com)
Elasticsearch 下载地址:
https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.17.18-windows-x86_64.zip
2 、安装分词器, elasticsearch-analysis-ik
进入elasticsearch安装目录的bin目录,执行如下命令
elasticsearch-plugin install https://github.com/medcl/elasticsearch-analysis-ik/releases/download/v7.17.18/elasticsearch-analysis-ik-7.17.18.zip
3 、 windows 添加到服务
elasticsearch-service.bat install
elasticsearch-service.bat后面还可以执行这些命令
install: 安装Elasticsearch服务
remove: 删除已安装的Elasticsearch服务(如果启动则停止服务)
start: 启动Elasticsearch服务(如果已安装)
stop: 停止服务(如果启动)
manager:启动GUI来管理已安装的服务
4 、查询所有索引信息
127.0.0.1:9200/_cat/indices?v&pretty
5 、 linux 环境安装
一、ElasticSearch安装_linux修改es的jdk-CSDN博客
4096\]报错处理 [ES错误:max file descriptors \[4096\] for elasticsearch process is too low, increase to at least \[65535\]-CSDN博客](https://blog.csdn.net/weixin_43950568/article/details/122459088 "ES错误:max file descriptors [4096] for elasticsearch process is too low, increase to at least [65535]-CSDN博客") #### **5** **、配置文件修改** # 节点名称 node.name: node-1 de.name: node-1 # 开放外网访问 network.host: 0.0.0.0 # 集群节点,没有集群只留一个 cluster.initial_master_nodes: \["node-1"
geoip报错处理
ingest.geoip.downloader.enabled: false
6 、启动
进入bin目录,执行:
./elasticsearch &
8 、查看进程信息
获取进程pid:
ps -ef | grep elastic
查看进程信息
netstat -nap | grep 进程pid
9 、代码高亮实现方法
Java中Elasticsearch高亮显示设置_java elasticsearchclient 返回高亮-CSDN博客