Package org.elasticsearch.action.search

Examples of org.elasticsearch.action.search.SearchResponse.took()


        System.out.println("--> Running just child query");
        // run just the child query, warm up first
        for (int j = 0; j < QUERY_WARMUP; j++) {
            SearchResponse searchResponse = client.prepareSearch().setQuery(termQuery("child.tag", "tag1")).execute().actionGet();
            if (j == 0) {
                System.out.println("--> Warmup took: " + searchResponse.took());
            }
            if (searchResponse.hits().totalHits() != COUNT) {
                System.err.println("--> mismatch on hits");
            }
        }
View Full Code Here


                    .setQuery(matchAllQuery())
                    .addFacet(histogramFacet("l_value").field("l_value").interval(4))
                    .addFacet(histogramFacet("date").field("date").interval(1000))
                    .execute().actionGet();
            if (j == 0) {
                System.out.println("--> Warmup took: " + searchResponse.took());
            }
            if (searchResponse.hits().totalHits() != COUNT) {
                System.err.println("--> mismatch on hits");
            }
        }
View Full Code Here

                    .setSearchType(SearchType.COUNT)
                    .setQuery(matchAllQuery())
                    .addFacet(termsFacet(field).field(field).executionHint(executionHint))
                    .execute().actionGet();
            if (j == 0) {
                System.out.println("--> Loading (" + field + "): took: " + searchResponse.took());
            }
            if (searchResponse.hits().totalHits() != COUNT) {
                System.err.println("--> mismatch on hits");
            }
        }
View Full Code Here

                    .setSearchType(SearchType.COUNT)
                    .setQuery(matchAllQuery())
                    .addFacet(termsStatsFacet(name).keyField(keyField).valueField(valueField))
                    .execute().actionGet();
            if (j == 0) {
                System.out.println("--> Loading (" + name + "): took: " + searchResponse.took());
            }
            if (searchResponse.hits().totalHits() != COUNT) {
                System.err.println("--> mismatch on hits");
            }
        }
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.