本机环境
windows10
安装步骤
一、安装node.js
官网下载地址:https://nodejs.org/en/download/
安装完成后:node -v
查看版本
二、下载elasticsearch-head
下载地址:https://github.com/mobz/elasticsearch-head
下载完成解压后:
命令行进入到该目录:
执行npm install
,执行成功后在执行npm run statr
:
服务开启成功,浏览器中访问:
如果elasticsearch-head 集群健康值: 未连接
:
找到elasticsearch.yml
:
在最下方增加:
http.cors.enabled: true
http.cors.allow-origin: "*"
http.cors.allow-methods: OPTIONS, HEAD, GET, POST, PUT, DELETE
http.cors.allow-headers: "X-Requested-With, Content-Type, Content-Length, X-User"
即可。
简单使用
数据浏览类似于我们平常使用的sql管理工具
,有索引(数据库)、类型(数据表)、字段。
查询这儿类似于postman
,只不过不是请求某个地址,而且使用一些方法和一些条件来进行一系列的操作。
结论
使用Elasticsearch-Head能让我们对elasticsearch有了更清晰和直观的认识
更详细的Elasticsearch-Head的介绍使用参考:
https://www.cnblogs.com/peterYong/p/11024684.html
https://www.cnblogs.com/peterYong/p/11024938.html