您当前的位置: 首页 >  I.T10001 ar

ES7.16.2基础操作之cardinality去重及性能优化(十六)

I.T10001 发布时间:2022-01-01 15:10:57 ,浏览量:4

## cardinality:每个月销售品牌去重统计
## precision_threshold优化准确率和内存开销
## HyperLogLog++(HLL)算法性能优化
GET tvs/_search
{
  "size": 0,
  "aggs": {
    "months": {
      "date_histogram": {
        "field": "sold_date",
        "interval": "month"
      },
      "aggs": {
        "distinct_brand": {
          "cardinality": {
            "field": "brand",
            "precision_threshold": 100
          }
        }
      }
    }
  }
}

关注
打赏
1688896170
查看更多评论

I.T10001

暂无认证

  • 4浏览

    0关注

    154博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文
立即登录/注册

微信扫码登录

0.0469s