Package org.elasticsearch.search.aggregations.bucket.terms

Examples of org.elasticsearch.search.aggregations.bucket.terms.Terms$Bucket


                                .addAggregation(
                                        terms("myterms")
                                                .size(AGG_SIZE)
                                                .field("num")
                                ).setSearchType(SearchType.COUNT).get();
                        Terms terms = resp.getAggregations().get("myterms");
                        assertNotNull("term aggs were calculated", terms);
                        totalThreadedTime.addAndGet(resp.getTookInMillis());
                    }
                }
            });
View Full Code Here


                        .addAggregation(
                                terms("myterms")
                                        .size(AGG_SIZE)
                                        .field("num")
                        ).setSearchType(SearchType.COUNT).get();
                Terms terms = resp.getAggregations().get("myterms");
                assertNotNull("term aggs were calculated", terms);
            }

            System.out.println("--> running single-threaded tests");
            runSingleThreadedQueries(client);
View Full Code Here

                "foo.token_count", "foo.token_count_unstored", "foo.token_count_with_doc_values"));
        SearchResponse result = searchByNumericRange(1, 10)
                .addAggregation(AggregationBuilders.terms("facet").field(facetField)).get();
        assertSearchReturns(result, "single", "bulk1", "bulk2", "multi", "multibulk1", "multibulk2");
        assertThat(result.getAggregations().asList().size(), equalTo(1));
        Terms terms = (Terms) result.getAggregations().asList().get(0);
        assertThat(terms.getBuckets().size(), equalTo(9));
    }
View Full Code Here

TOP

Related Classes of org.elasticsearch.search.aggregations.bucket.terms.Terms$Bucket

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.