ElasticSearch搜索调试

通过Kibana

Dev Tools -> Console

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
GET /appblog/_search
{
"query": {
"bool": {
"must": [
{
"match": {
"loglvl": "ERROR"
}
}
]
}
},
"from": 0,
"size": 10,
"sort": [
{
"@timestamp": {
"order": "desc"
}
}
]
}

通过Postman

ElasticSearch API

POST: http://192.168.1.10:9200/appblog/_search
header: {"Content-Type": "application/json"}
body:

1
2
{"query": {"bool": {"must": [{"match": {"loglvl": "ERROR"}}]}}, "from": 0, "size": 10, 
"sort": [{"@timestamp": {"order": "desc"}}]}

Kibana Console API

POST: http://192.168.1.10:5601/api/console/proxy?path=/appblog/_search&method=POST
header: {"Content-Type": "application/json", "kbn-version": "7.1.0"}
body:

1
2
{"query": {"bool": {"must": [{"match": {"loglvl": "ERROR"}}]}}, "from": 0, "size": 10, 
"sort": [{"@timestamp": {"order": "desc"}}]}

Powered by AppBlog.CN     浙ICP备14037229号

Copyright © 2012 - 2020 APP开发技术博客 All Rights Reserved.

访客数 : | 访问量 :