ESkibana安装及交互操作
Posted longronglang
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ESkibana安装及交互操作相关的知识,希望对你有一定的参考价值。
一、ES的安装与启动
1、ES安装(Windows环境)
- 下载地址:https://www.elastic.co/cn/downloads/past-releases#elasticsearch
- 版本:6.3.2
- 运行环境:jdk1.8以上
- 双击.bat启动
2、查看效果
浏览器输入:http://localhost:9200,返回如下json。
{
"name" : "RDFnj43",
"cluster_name" : "elasticsearch",
"cluster_uuid" : "X-h3NABsTPOitRIeqIJj4Q",
"version" : {
"number" : "6.3.2",
"build_flavor" : "default",
"build_type" : "zip",
"build_hash" : "053779d",
"build_date" : "2018-07-20T05:20:23.451332Z",
"build_snapshot" : false,
"lucene_version" : "7.3.1",
"minimum_wire_compatibility_version" : "5.6.0",
"minimum_index_compatibility_version" : "5.0.0"
},
"tagline" : "You Know, for Search"
}
证明启动成功
二、kibana安装及启动
1、kibana安装(Windows环境)
- 下载地址:https://www.elastic.co/cn/downloads/past-releases#kibana
- 版本:6.3.2
- 运行环境:jdk1.8以上
- 双击.bat启动
2、查看效果
浏览器输入:http://localhost:5601,如下所示,证明启动成功
三、交互操作
1、ES与mysql的对应关系理解
2、使用postman与ES交互操作案例
{ "id": "7b72aa64-67f2-5276-9f9f-f50d5c4ef1ef", "name": "ES与postman交互", "description": "", "order": [ "ed0c094d-ad2f-c724-0537-030a693b36dc", "0ea20269-f2b9-2f40-f8e6-06d09609bf16", "77d672e4-9ad5-6184-530f-b12c29501f76", "8935a2f2-5e8b-ec82-4633-f5bbfcbdc1b1", "e4bdcf5a-c4df-39c3-75a4-82285cc98af0", "72a69b67-c537-c442-d684-dae1f0cd38a6", "c04a38a6-d13a-d63c-4d2f-149c4072cdcb", "f8fe5a0d-05e4-fa30-76b5-2cae83c29928" ], "folders": [], "folders_order": [], "timestamp": 1575722536609, "owner": 0, "public": false, "requests": [ { "id": "0ea20269-f2b9-2f40-f8e6-06d09609bf16", "headers": "", "headerData": [], "url": "http://localhost:9200/test", "queryParams": [], "preRequestScript": null, "pathVariables": {}, "pathVariableData": [], "method": "PUT", "data": null, "dataMode": "params", "version": 2, "tests": null, "currentHelper": "normal", "helperAttributes": {}, "time": 1575722819075, "name": "创建索引-test", "description": "http://localhost:9200/_all", "collectionId": "7b72aa64-67f2-5276-9f9f-f50d5c4ef1ef", "responses": [] }, { "id": "72a69b67-c537-c442-d684-dae1f0cd38a6", "headers": "Content-Type: application/json ", "headerData": [ { "key": "Content-Type", "value": "application/json", "description": "", "enabled": true } ], "url": "http://localhost:9200/person/_doc/2", "queryParams": [], "pathVariables": {}, "pathVariableData": [], "preRequestScript": null, "method": "PUT", "collectionId": "7b72aa64-67f2-5276-9f9f-f50d5c4ef1ef", "data": [], "dataMode": "raw", "name": "新增数据-person2", "description": "", "descriptionFormat": "html", "time": 1575724045084, "version": 2, "responses": [], "tests": null, "currentHelper": "normal", "helperAttributes": {}, "rawModeData": "{ "userName": "ESRC", "age": 22, "interests": ["PLAY GAME", "FOOTBALL"] }" }, { "id": "77d672e4-9ad5-6184-530f-b12c29501f76", "headers": "", "headerData": [], "url": "http://localhost:9200/test", "queryParams": [], "pathVariables": {}, "pathVariableData": [], "preRequestScript": null, "method": "DELETE", "collectionId": "7b72aa64-67f2-5276-9f9f-f50d5c4ef1ef", "data": null, "dataMode": "params", "name": "删除索引-test", "description": "", "descriptionFormat": "html", "time": 1575722861291, "version": 2, "responses": [], "tests": null, "currentHelper": "normal", "helperAttributes": {} }, { "id": "8935a2f2-5e8b-ec82-4633-f5bbfcbdc1b1", "headers": "", "headerData": [], "url": "http://localhost:9200/person", "queryParams": [], "pathVariables": {}, "pathVariableData": [], "preRequestScript": null, "method": "PUT", "collectionId": "7b72aa64-67f2-5276-9f9f-f50d5c4ef1ef", "data": null, "dataMode": "params", "name": "创建索引persion", "description": "", "descriptionFormat": "html", "time": 1575722978016, "version": 2, "responses": [], "tests": null, "currentHelper": "normal", "helperAttributes": {} }, { "id": "c04a38a6-d13a-d63c-4d2f-149c4072cdcb", "headers": "Content-Type: application/json ", "headerData": [ { "key": "Content-Type", "value": "application/json", "description": "", "enabled": true } ], "url": "http://localhost:9200/person/_doc/1", "queryParams": [], "pathVariables": {}, "pathVariableData": [], "preRequestScript": null, "method": "GET", "collectionId": "7b72aa64-67f2-5276-9f9f-f50d5c4ef1ef", "data": [], "dataMode": "raw", "name": "按照id查询", "description": "", "descriptionFormat": "html", "time": 1575724086023, "version": 2, "responses": [], "tests": null, "currentHelper": "normal", "helperAttributes": {}, "rawModeData": "{ "userName": "tom", "age": 19, "interests": ["music", "sports"] }" }, { "id": "e4bdcf5a-c4df-39c3-75a4-82285cc98af0", "headers": "Content-Type: application/json ", "headerData": [ { "key": "Content-Type", "value": "application/json", "description": "", "enabled": true } ], "url": "http://localhost:9200/person/_doc/1", "queryParams": [], "preRequestScript": null, "pathVariables": {}, "pathVariableData": [], "method": "PUT", "data": [], "dataMode": "raw", "tests": null, "currentHelper": "normal", "helperAttributes": {}, "time": 1575724010195, "name": "新增数据-person", "description": "", "collectionId": "7b72aa64-67f2-5276-9f9f-f50d5c4ef1ef", "responses": [], "rawModeData": "{ "userName": "tom", "age": 19, "interests": ["music", "sports"] }" }, { "id": "ed0c094d-ad2f-c724-0537-030a693b36dc", "headers": "", "headerData": [], "url": "http://localhost:9200/_all", "queryParams": [], "preRequestScript": null, "pathVariables": {}, "pathVariableData": [], "method": "GET", "data": null, "dataMode": "params", "version": 2, "tests": null, "currentHelper": "normal", "helperAttributes": {}, "time": 1575722733199, "name": "查看所有索引", "description": "http://localhost:9200/_all", "collectionId": "7b72aa64-67f2-5276-9f9f-f50d5c4ef1ef", "responses": [] }, { "id": "f8fe5a0d-05e4-fa30-76b5-2cae83c29928", "headers": "Content-Type: application/json ", "headerData": [ { "key": "Content-Type", "value": "application/json", "description": "", "enabled": true } ], "url": "http://localhost:9200/person/_doc/_search?q=userName:tom", "queryParams": [ { "key": "q", "value": "userName:tom", "equals": true, "description": "", "enabled": true } ], "pathVariables": {}, "pathVariableData": [], "preRequestScript": null, "method": "GET", "collectionId": "7b72aa64-67f2-5276-9f9f-f50d5c4ef1ef", "data": [], "dataMode": "raw", "name": "按照用户名查询", "description": "", "descriptionFormat": "html", "time": 1575724275505, "version": 2, "responses": [], "tests": null, "currentHelper": "normal", "helperAttributes": {}, "rawModeData": "{ "userName": "tom", "age": 19, "interests": ["music", "sports"] }" } ] }
- GET为查询操作
- PUT为创建索引
- DELETE为删除索引
3、使用kibana与ES交互操作
找到dev tools,进行交互操作
//查询所有的索引 GET _all1
//按照id查询
GET person/_doc/2
与es交互式操作格式:
POST /person/_search { "query": { "bool": { "must": [ { "match": { "interests": "FOOTBALL" } }, { "match": { "userName": "ESRC22" } } ] } } }
- must为且的关系
- must处为should的时候为或的关系
以上是关于ESkibana安装及交互操作的主要内容,如果未能解决你的问题,请参考以下文章
Elasticsearch 分布式搜索引擎 -- 初识elasticsearch(了解ES倒排索引es的一些概念安装eskibana)
Android 插件化VirtualApp 源码分析 ( 目前的 API 现状 | 安装应用源码分析 | 安装按钮执行的操作 | 返回到 HomeActivity 执行的操作 )(代码片段
续:纠正:ubuntu7.04可以安装,而且完美的安装 ! for《Oracle-10.2.0.1,打补丁10.2.0.5:在 debian 版本4不含4以上,及 ubuntu 7.04不含(代码片段