欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

Kibana常用语法

程序员文章站 2022-07-06 10:40:15
...
GET brand201811_v2/_search
方法一:查询数据源,及相关url的文章
{
  "query": {
    "bool": {
      "must": [
        {
          "term": {
            "dSource": {
              "value": "news/sogou"
            }
          }
        },
        {
          "term": {
            "url": {
              "value": "http://www.scgdj.com/new/include/news_view.php?NDLzv3qGY.xml="
            }
          }
        }
      ]
    }
  },
  "size": 10,
  "sort": [
    {
      "pDate": {
        "order": "desc"
      }
    }
  ]
}

方法二:查询数据源,包含某个字段的文章 GET brand201812_v2/_search { "query": { "bool": { "must": [ { "term": { "dSource": { "value": "news/pttweb" } } }, { "match_phrase": { "content": "选举" } } ] } }, "size": 10, "sort": [ { "pDate": { "order": "desc" } } ] }