码迷,mamicode.com
首页 > 其他好文 > 详细

ES聚合(查询分享数量大于30的uuid)

时间:2017-03-04 17:32:07      阅读:1024      评论:0      收藏:0      [点我收藏+]

标签:size   ati   boost   log   http   field   tps   order   erro   

{
  "size": 0,
  "query": {
    "bool": {
      "must": [
        {
          "terms": {
            "ul_actType": [
              1030
            ],
            "boost": 1
          }
        },
        {
          "terms": {
            "ul_distChannel": [
              2000,
              1000,
              1001,
              1019
            ],
            "boost": 1
          }
        }
      ],
      "disable_coord": false,
      "adjust_pure_negative": true,
      "boost": 1
    }
  },
  "explain": false,
  "aggregations": {
    "aggs_targetId": {
      "terms": {
        "field": "ul_targetId",
        "size": 30,
        "min_doc_count": 1,
        "shard_min_doc_count": 0,
        "show_term_doc_count_error": false,
        "order": [
          {
            "_count": "desc"
          },
          {
            "_term": "asc"
          }
        ]
      }
    }
  }
}

JSON转CSV:  https://json-csv.com/

ES聚合(查询分享数量大于30的uuid)

标签:size   ati   boost   log   http   field   tps   order   erro   

原文地址:http://www.cnblogs.com/0xcafebaby/p/6501814.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!