Package org.elasticsearch.client

Examples of org.elasticsearch.client.Client.prepareSearch()


        System.out.println("## Performance");
        for (int i = 0; i < 3; ++i) {
            for (Distribution d : Distribution.values()) {
                System.out.println("#### " + d);
                for (int j = 0; j < QUERY_WARMUP; ++j) {
                    client.prepareSearch(d.indexName()).setSearchType(SearchType.COUNT).addAggregation(percentiles("pcts").field("v").percentiles(PERCENTILES)).execute().actionGet();
                }
                long start = System.nanoTime();
                for (int j = 0; j < QUERY_COUNT; ++j) {
                    client.prepareSearch(d.indexName()).setSearchType(SearchType.COUNT).addAggregation(percentiles("pcts").field("v").percentiles(PERCENTILES)).execute().actionGet();
                }
View Full Code Here


                for (int j = 0; j < QUERY_WARMUP; ++j) {
                    client.prepareSearch(d.indexName()).setSearchType(SearchType.COUNT).addAggregation(percentiles("pcts").field("v").percentiles(PERCENTILES)).execute().actionGet();
                }
                long start = System.nanoTime();
                for (int j = 0; j < QUERY_COUNT; ++j) {
                    client.prepareSearch(d.indexName()).setSearchType(SearchType.COUNT).addAggregation(percentiles("pcts").field("v").percentiles(PERCENTILES)).execute().actionGet();
                }
                System.out.println(new TimeValue((System.nanoTime() - start) / QUERY_COUNT, TimeUnit.NANOSECONDS));
            }
        }
    }
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.