break; histogram.order(order); break; default:
/** * Sets the order in which the buckets will be returned. A tie-breaker may be added to avoid non-deterministic * ordering. */ public HistogramAggregationBuilder order(List<BucketOrder> orders) { if (orders == null) { throw new IllegalArgumentException("[orders] must not be null: [" + name + "]"); } // if the list only contains one order use that to avoid inconsistent xcontent order(orders.size() > 1 ? BucketOrder.compound(orders) : orders.get(0)); return this; }
/** * Sets the order in which the buckets will be returned. A tie-breaker may be added to avoid non-deterministic * ordering. */ public HistogramAggregationBuilder order(List<BucketOrder> orders) { if (orders == null) { throw new IllegalArgumentException("[orders] must not be null: [" + name + "]"); } // if the list only contains one order use that to avoid inconsistent xcontent order(orders.size() > 1 ? BucketOrder.compound(orders) : orders.get(0)); return this; }
/** * Sets the order in which the buckets will be returned. A tie-breaker may be added to avoid non-deterministic * ordering. */ public HistogramAggregationBuilder order(List<BucketOrder> orders) { if (orders == null) { throw new IllegalArgumentException("[orders] must not be null: [" + name + "]"); } // if the list only contains one order use that to avoid inconsistent xcontent order(orders.size() > 1 ? BucketOrder.compound(orders) : orders.get(0)); return this; }
switch (props.get(AGG_ORDER_PROP).toLowerCase()) { case AGG_ORDER_COUNT_DESC: ret.order(BucketOrder.count(false)); break; case AGG_ORDER_COUNT_ASC: ret.order(BucketOrder.count(true)); break; case AGG_ORDER_KEY_DESC: ret.order(BucketOrder.key(false)); break; case AGG_ORDER_KEY_ASC: ret.order(BucketOrder.key(true)); break; default:
break; histogram.order(order); break; default: