Search in sources :

Example 1 with AggregationPath

use of org.elasticsearch.search.aggregations.support.AggregationPath in project elasticsearch by elastic.

the class InternalOrder method validate.

public static Terms.Order validate(Terms.Order order, Aggregator termsAggregator) {
    if (order instanceof CompoundOrder) {
        for (Terms.Order innerOrder : ((CompoundOrder) order).orderElements) {
            validate(innerOrder, termsAggregator);
        }
        return order;
    } else if (!(order instanceof Aggregation)) {
        return order;
    }
    AggregationPath path = ((Aggregation) order).path();
    path.validate(termsAggregator);
    return order;
}
Also used : Order(org.elasticsearch.search.aggregations.bucket.terms.Terms.Order) MultiBucketsAggregation(org.elasticsearch.search.aggregations.bucket.MultiBucketsAggregation) AggregationPath(org.elasticsearch.search.aggregations.support.AggregationPath)

Aggregations

MultiBucketsAggregation (org.elasticsearch.search.aggregations.bucket.MultiBucketsAggregation)1 Order (org.elasticsearch.search.aggregations.bucket.terms.Terms.Order)1 AggregationPath (org.elasticsearch.search.aggregations.support.AggregationPath)1