Package org.elasticsearch.search.aggregations.metrics.percentiles

Examples of org.elasticsearch.search.aggregations.metrics.percentiles.Percentiles


                percentiles.put(Double.parseDouble(entry.getKey()), (Double) entry.getValue());
            }
            System.out.println("Expected percentiles: " + percentiles);
            System.out.println();
            SearchResponse resp = client.prepareSearch(d.indexName()).setSearchType(SearchType.COUNT).addAggregation(percentiles("pcts").field("v").percentiles(PERCENTILES)).execute().actionGet();
            Percentiles pcts = resp.getAggregations().get("pcts");
            Map<Double, Double> asMap = Maps.newLinkedHashMap();
            double sumOfErrorSquares = 0;
            for (Percentile percentile : pcts) {
                asMap.put(percentile.getPercent(), percentile.getValue());
                double error = percentile.getValue() - percentiles.get(percentile.getPercent());
View Full Code Here

TOP

Related Classes of org.elasticsearch.search.aggregations.metrics.percentiles.Percentiles

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.