elasticsearch对聚合数据进行筛选过滤

search_json = {
        "size": 0,
        "aggs": {
            "group_by_title": {
                "terms": {
                    "field": "title_en.raw",
                    "size": 5000
                },
                "aggs": {
                    "having": {
                        "bucket_selector": {
                            "buckets_path": {
                                "view_count": "_count"
                            },
                            "script": "params.view_count>1"
                        }
                    }
                }
            }
        }
    }

bucket_selector

  

posted @ 2021-12-08 08:59  kakaok  阅读(524)  评论(0编辑  收藏  举报