|
@ -428,8 +428,6 @@ public class ViewService extends BaseJpaService<View, ViewDao> {
|
|
aggNamePre = ViewConstant.TOTAL_DIMENSION_CODE + "-";
|
|
aggNamePre = ViewConstant.TOTAL_DIMENSION_CODE + "-";
|
|
}
|
|
}
|
|
|
|
|
|
// TODO 数值类型场合,又是多维度数据集时,需要指定数据集
|
|
|
|
|
|
|
|
if ("sum".equals(quota.getBasicFormulaType())) {
|
|
if ("sum".equals(quota.getBasicFormulaType())) {
|
|
// 求和
|
|
// 求和
|
|
String aggName = aggNamePre + "sum-result";
|
|
String aggName = aggNamePre + "sum-result";
|
|
@ -483,7 +481,7 @@ public class ViewService extends BaseJpaService<View, ViewDao> {
|
|
BoolQueryBuilder quotaBoolQueryBuilder = QueryBuilders.boolQuery();
|
|
BoolQueryBuilder quotaBoolQueryBuilder = QueryBuilders.boolQuery();
|
|
this.joinFilters(quotaBoolQueryBuilder, quotaFilterModelList);
|
|
this.joinFilters(quotaBoolQueryBuilder, quotaFilterModelList);
|
|
|
|
|
|
String aggName = quota.getDimensionCode() + "-filter";
|
|
|
|
|
|
String aggName = quota.getCode() + "-filter";
|
|
filterAgg = AggregationBuilders.filter(aggName).filter(quotaBoolQueryBuilder);
|
|
filterAgg = AggregationBuilders.filter(aggName).filter(quotaBoolQueryBuilder);
|
|
filterAgg.subAggregation(metricAgg);
|
|
filterAgg.subAggregation(metricAgg);
|
|
}
|
|
}
|