Examples of subAggregator()


Examples of org.elasticsearch.search.aggregations.Aggregator.subAggregator()

     */
    public Aggregator resolveAggregator(Aggregator root) {
        Aggregator aggregator = root;
        for (int i = 0; i < tokens.length; i++) {
            OrderPath.Token token = tokens[i];
            aggregator = aggregator.subAggregator(token.name);
            assert (aggregator instanceof SingleBucketAggregator && i <= tokens.length - 1) ||
                    (aggregator instanceof NumericMetricsAggregator && i == tokens.length - 1) :
                    "this should be picked up before aggregation execution - on validate";
        }
        return aggregator;
View Full Code Here

Examples of org.elasticsearch.search.aggregations.Aggregator.subAggregator()

     * @param root  The point of reference of this path
     */
    public void validate(Aggregator root) {
        Aggregator aggregator = root;
        for (int i = 0; i < tokens.length; i++) {
            aggregator = aggregator.subAggregator(tokens[i].name);
            if (aggregator == null) {
                throw new AggregationExecutionException("Invalid term-aggregator order path [" + this + "]. Unknown aggregation [" + tokens[i].name + "]");
            }
            if (i < tokens.length - 1) {

View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.