Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Add a range aggregations
- *
- * @param exchange current exchange.
- * @param name aggregation name.
- * @param field the field where to aggregate data
- * @param size the size of aggregation
- */
- protected void addRangeAggregation (Exchange exchange, String name, String field, int size) {
- BoolQueryBuilder localQuery = boolQuery();
- addLocalClauses (localQuery, exchange , name);
- AbstractAggregationBuilder aggregation = createHistogramAggregation(name, field , size);
- globalAggregations.add(aggregation);
- aggregations.add(AggregationBuilders.filter(name).filter(localQuery).subAggregation(aggregation));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement