Elasticsearch教程(6) ES桶聚合Query DSL-Terms Aggregation
Elasticsearch桶聚合TermsAggregation1准备测试数据1.1插入数据DSL1.2表格展示2TermsAggregation(根据字段的值分组)2.1根据dept分组,求每个部门的数量2.1.1SQL2.1.2DSL2.2根据dept分组,求每个部门的数量,并排序2.2.1SQL2.2.2DSL2.3对统计结果过滤,加having2.3.1SQL2.3.2SQL转DSL语句2