Package org.elasticsearch.search.aggregations

Examples of org.elasticsearch.search.aggregations.Aggregation


        .subAggregation(AggregationBuilders.count("countActiveRules")))
      .setSize(0)
      .setTypes(this.getIndexType());
    SearchResponse response = request.get();
    Map<String, Multimap<String, FacetValue>> stats = new HashMap<String, Multimap<String, FacetValue>>();
    Aggregation aggregation = response.getAggregations().get(ActiveRuleNormalizer.ActiveRuleField.PROFILE_KEY.field());
    for (Terms.Bucket value : ((Terms) aggregation).getBuckets()) {
      stats.put(value.getKey()
        , this.processAggregations(value.getAggregations()));
    }
View Full Code Here


    public double resolveValue(HasAggregations root) {
        HasAggregations parent = root;
        double value = Double.NaN;
        for (int i = 0; i < tokens.length; i++) {
            OrderPath.Token token = tokens[i];
            Aggregation agg = parent.getAggregations().get(token.name);

            if (agg == null) {
                throw new ElasticsearchIllegalArgumentException("Invalid order path [" + this +
                        "]. Cannot find aggregation named [" + token.name + "]");
            }
View Full Code Here

TOP

Related Classes of org.elasticsearch.search.aggregations.Aggregation

Copyright © 2018 www.massapicom. 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.