|
@ -19,7 +19,9 @@ import org.elasticsearch.index.query.QueryBuilder;
|
|
import org.elasticsearch.search.aggregations.AbstractAggregationBuilder;
|
|
import org.elasticsearch.search.aggregations.AbstractAggregationBuilder;
|
|
import org.elasticsearch.search.aggregations.Aggregation;
|
|
import org.elasticsearch.search.aggregations.Aggregation;
|
|
import org.elasticsearch.search.aggregations.AggregationBuilders;
|
|
import org.elasticsearch.search.aggregations.AggregationBuilders;
|
|
|
|
import org.elasticsearch.search.aggregations.InternalAggregations;
|
|
import org.elasticsearch.search.aggregations.bucket.filter.FilterAggregationBuilder;
|
|
import org.elasticsearch.search.aggregations.bucket.filter.FilterAggregationBuilder;
|
|
|
|
import org.elasticsearch.search.aggregations.bucket.filter.InternalFilter;
|
|
import org.elasticsearch.search.aggregations.bucket.terms.*;
|
|
import org.elasticsearch.search.aggregations.bucket.terms.*;
|
|
import org.elasticsearch.search.aggregations.metrics.avg.InternalAvg;
|
|
import org.elasticsearch.search.aggregations.metrics.avg.InternalAvg;
|
|
import org.elasticsearch.search.aggregations.metrics.max.InternalMax;
|
|
import org.elasticsearch.search.aggregations.metrics.max.InternalMax;
|
|
@ -410,6 +412,10 @@ public class AggregationBuildHandler {
|
|
}else if (aggregation instanceof InternalAvg) {
|
|
}else if (aggregation instanceof InternalAvg) {
|
|
InternalAvg valueCount = (InternalAvg) aggregation;
|
|
InternalAvg valueCount = (InternalAvg) aggregation;
|
|
value = valueCount.getValue();
|
|
value = valueCount.getValue();
|
|
|
|
}else if (aggregation instanceof InternalFilter) {
|
|
|
|
InternalFilter internalFilter = (InternalFilter) aggregation;
|
|
|
|
List<Aggregation> aggregationList = internalFilter.getAggregations().asList();
|
|
|
|
value = getInternalAggValue(key,aggregationList.get(0));
|
|
}
|
|
}
|
|
if(value != null){
|
|
if(value != null){
|
|
map.put(key, value);
|
|
map.put(key, value);
|