ElasticSearch搜索调试

通过Kibana

Dev Tools -> Console

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:

{"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:

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

版权声明:
作者:Joe.Ye
链接:https://www.appblog.cn/index.php/2023/03/19/elasticsearch-search-debugging/
来源:APP全栈技术分享
文章版权归作者所有,未经允许请勿转载。

THE END
分享
二维码
打赏
海报
ElasticSearch搜索调试
通过Kibana Dev Tools -> Console GET /appblog/_search { "query": { "bool": { "must": [ { ……
<<上一篇
下一篇>>
文章目录
关闭
目 录