{"id":1378,"date":"2023-03-19T10:53:44","date_gmt":"2023-03-19T02:53:44","guid":{"rendered":"https:\/\/www.appblog.cn\/?p=1378"},"modified":"2023-04-28T21:13:21","modified_gmt":"2023-04-28T13:13:21","slug":"elasticsearch-search-debugging","status":"publish","type":"post","link":"https:\/\/www.appblog.cn\/index.php\/2023\/03\/19\/elasticsearch-search-debugging\/","title":{"rendered":"ElasticSearch\u641c\u7d22\u8c03\u8bd5"},"content":{"rendered":"<h2>\u901a\u8fc7Kibana<\/h2>\n<p><code>Dev Tools<\/code> -&gt; <code>Console<\/code><\/p>\n<p><!-- more --><\/p>\n<pre><code>GET \/appblog\/_search\n{\n  &quot;query&quot;: {\n    &quot;bool&quot;: {\n      &quot;must&quot;: [\n        {\n          &quot;match&quot;: {\n            &quot;loglvl&quot;: &quot;ERROR&quot;\n          }\n        }\n      ]\n    }\n  },\n  &quot;from&quot;: 0,\n  &quot;size&quot;: 10,\n  &quot;sort&quot;: [\n    {\n      &quot;@timestamp&quot;: {\n        &quot;order&quot;: &quot;desc&quot;\n      }\n    }\n  ]\n}<\/code><\/pre>\n<h2>\u901a\u8fc7Postman<\/h2>\n<h3>ElasticSearch API<\/h3>\n<p>POST: <a target=\"_blank\" rel=\"noopener\" href=\"http:\/\/192.168.1.10:9200\/appblog\/_search\">http:\/\/192.168.1.10:9200\/appblog\/_search<\/a><br \/>\nheader: <code>{&quot;Content-Type&quot;: &quot;application\/json&quot;}<\/code><br \/>\nbody:<\/p>\n<pre><code class=\"language-json\">{&quot;query&quot;: {&quot;bool&quot;: {&quot;must&quot;: [{&quot;match&quot;: {&quot;loglvl&quot;: &quot;ERROR&quot;}}]}}, &quot;from&quot;: 0, &quot;size&quot;: 10, \n&quot;sort&quot;: [{&quot;@timestamp&quot;: {&quot;order&quot;: &quot;desc&quot;}}]}<\/code><\/pre>\n<h3>Kibana Console API<\/h3>\n<p>POST: <a target=\"_blank\" rel=\"noopener\" href=\"http:\/\/192.168.1.10:5601\/api\/console\/proxy?path=\/appblog\/_search&amp;method=POST\">http:\/\/192.168.1.10:5601\/api\/console\/proxy?path=\/appblog\/_search&#038;method=POST<\/a><br \/>\nheader: <code>{&quot;Content-Type&quot;: &quot;application\/json&quot;, &quot;kbn-version&quot;: &quot;7.1.0&quot;}<\/code><br \/>\nbody:<\/p>\n<pre><code class=\"language-json\">{&quot;query&quot;: {&quot;bool&quot;: {&quot;must&quot;: [{&quot;match&quot;: {&quot;loglvl&quot;: &quot;ERROR&quot;}}]}}, &quot;from&quot;: 0, &quot;size&quot;: 10, \n&quot;sort&quot;: [{&quot;@timestamp&quot;: {&quot;order&quot;: &quot;desc&quot;}}]}<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u901a\u8fc7Kibana Dev Tools -&gt; Console GET \/appblog\/_search { [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[345],"tags":[180],"class_list":["post-1378","post","type-post","status-publish","format-standard","hentry","category-elk","tag-elasticsearch"],"_links":{"self":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/1378","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/comments?post=1378"}],"version-history":[{"count":0,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/1378\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/media?parent=1378"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/categories?post=1378"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/tags?post=1378"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}