Examples of terminatedEarly()


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

Examples of org.elasticsearch.action.count.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);
        assertFalse(countResponse.terminatedEarly());
    }

    @Test
    public void localDependentDateTests() throws Exception {
        assertAcked(prepareCreate("test")
View Full Code Here

Examples of org.elasticsearch.search.query.QuerySearchResult.terminatedEarly()

        for (AtomicArray.Entry<? extends QuerySearchResultProvider> entry : queryResults) {
            QuerySearchResult result = entry.value.queryResult();
            if (result.searchTimedOut()) {
                timedOut = true;
            }
            if (result.terminatedEarly() != null) {
                if (terminatedEarly == null) {
                    terminatedEarly = result.terminatedEarly();
                } else if (result.terminatedEarly()) {
                    terminatedEarly = true;
                }
View Full Code Here

Examples of org.elasticsearch.search.query.QuerySearchResult.terminatedEarly()

            if (result.searchTimedOut()) {
                timedOut = true;
            }
            if (result.terminatedEarly() != null) {
                if (terminatedEarly == null) {
                    terminatedEarly = result.terminatedEarly();
                } else if (result.terminatedEarly()) {
                    terminatedEarly = true;
                }
            }
            totalHits += result.topDocs().totalHits;
View Full Code Here

Examples of org.elasticsearch.search.query.QuerySearchResult.terminatedEarly()

                timedOut = true;
            }
            if (result.terminatedEarly() != null) {
                if (terminatedEarly == null) {
                    terminatedEarly = result.terminatedEarly();
                } else if (result.terminatedEarly()) {
                    terminatedEarly = true;
                }
            }
            totalHits += result.topDocs().totalHits;
            if (!Float.isNaN(result.topDocs().getMaxScore())) {
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.