首页 > 代码库 > ES聚合(查询分享数量大于30的uuid)

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

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