Package org.elasticsearch.search.aggregations.Aggregator

Examples of org.elasticsearch.search.aggregations.Aggregator.SubAggCollectionMode


                    .setSource("test_field", "test " + i, "even", i % 2 == 0)
                    .get();
        }
        client().admin().indices().prepareRefresh("test-idx").execute().actionGet();

        SubAggCollectionMode aggCollectionMode = randomFrom(SubAggCollectionMode.values());
       
        SearchResponse response = client().prepareSearch("test-idx")
                .setQuery(QueryBuilders.termQuery("even", true))
                .addAggregation(AggregationBuilders.terms("test").field("test_field").size(recordCount * 2)
                        .collectMode(aggCollectionMode))
View Full Code Here


        client().admin().indices().prepareRefresh().execute().actionGet();

        // disable field data
        updateFormat("disabled");

        SubAggCollectionMode aggCollectionMode = randomFrom(SubAggCollectionMode.values());
        SearchResponse resp = null;
        // try to run something that relies on field data and make sure that it fails
        for (int i = 0; i < searchCycles; i++) {
            try {
                resp = client().prepareSearch("test").setPreference(Integer.toString(i)).addAggregation(AggregationBuilders.terms("t").field("s")
View Full Code Here

TOP

Related Classes of org.elasticsearch.search.aggregations.Aggregator.SubAggCollectionMode

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.