Package org.elasticsearch.action.count

Examples of org.elasticsearch.action.count.CountResponse.terminatedEarly()


        // threshold <= actual count
        for (int i = 1; i <= max; i++) {
            countResponse = client().prepareCount("test").setQuery(QueryBuilders.rangeQuery("field").gte(lowerBound).lte(upperBound)).setTerminateAfter(i).execute().actionGet();
            assertHitCount(countResponse, i);
            assertTrue(countResponse.terminatedEarly());
        }

        // threshold > actual count
        countResponse = client().prepareCount("test").setQuery(QueryBuilders.rangeQuery("field").gte(lowerBound).lte(upperBound)).setTerminateAfter(max + randomIntBetween(1, max)).execute().actionGet();
        assertHitCount(countResponse, max);
View Full Code Here


        }

        // threshold > actual count
        countResponse = client().prepareCount("test").setQuery(QueryBuilders.rangeQuery("field").gte(lowerBound).lte(upperBound)).setTerminateAfter(max + randomIntBetween(1, max)).execute().actionGet();
        assertHitCount(countResponse, max);
        assertFalse(countResponse.terminatedEarly());
    }

    @Test
    public void localDependentDateTests() throws Exception {
        assertAcked(prepareCreate("test")
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.