查看 spring data es 和 es 的版本关系
https://github.com/spring-projects/spring-data-elasticsearch
下载所需的版本
https://www.elastic.co/downloads/past-releases
windows下直接启动bat 脚本
打开浏览器,输入 http://localhost:9200 ,显式以下画面,说明ES安装成功。
pom 依赖
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.4.RELEASE</version>
<relativePath/>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>elasticsearch</artifactId>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-autoconfigure</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-elasticsearch</artifactId>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.16.6</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>22.0</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
springboot 配置
spring:
data:
elasticsearch:
# 集群名 默认 elasticsearch
cluster-name: elasticsearch
# 连接节点,注意在集群中通信都是9300端口,否则会报错无法连接上!
cluster-nodes: 127.0.0.1:9300
# 是否本地连接
repositories:
# 仓库中数据存储
enabled: true
可视化工具
https://github.com/360EntSecGroup-Skylar/ElasticHD
带了sql 翻译功能,还挺强大。
参考地址
严选 | Elasticsearch史上最全最常用工具清单
https://blog.csdn.net/laoyang360/article/details/80645710