Elasticsearch安装(四), elasticsearch head 插件安装和使用。

安装方式如下:

一、安装Elasticsearch-Head

1.插件安装方式(推荐)

#在Elasticsearch目录下

$/bin/plugin -install mobz/elasticsearch-head

如果提示

ERROR: unknown command [-install]. Use [-h] option to list available commands

是因为好像2.0以上的版本-install 变成了 install了。

elasticsearch/bin/plugin install mobz/elasticsearch-head

2.下载安装方式

https://github.com/mobz/elasticsearch-head下载ZIP包。

elasticsearch  目录下创建目录/plugins/head/_site 并且将刚刚解压的elasticsearch-head-master目录下所有内容COPY到当前创建的/plugins/head/_site/目录下即可。

二、重启Elasticsearch。访问。

访问地址是http://{你的ip地址}:9200/_plugin/head/

http  端口默认是9200 。

三、Elasticsearch-head 插件界面介绍。

1.界面介绍

因为我是单点的,所以健康度直接是yellow,黄色不影响使用,红色就有问题了,不过具体看问题是什么问题。

我这个不知道怎么回事,直接是中文的,是根据地区IP默认识别安装的。所以其他功能我不讲了,我就直说一下看索引(index)的 Mapping  在哪看。

这个可以看到当前索引(index)下所有类型(Type) 的 Mapping  ,当然你不创建,就会根据你数据类型来自动生成 Mapping  ,我后面会讲到 Mapping  生成的方式方法。

2.数据浏览

查看命中数据详情。

 

3.基本查询

 

4.复合查询。

其他功能,自己去探索。

四、安全问题(严重)。

因为该插件可以对数据进行,增删改查。故生产环境尽量不要使用,如果要使用,最少要限制IP地址。尽量不要使用。

原文地址:https://www.cnblogs.com/austinspark-jessylu/p/6879160.html