Examples of terminateAfter()


Examples of org.elasticsearch.action.count.CountRequest.terminateAfter()

        final int terminateAfter = request.paramAsInt("terminate_after", DEFAULT_TERMINATE_AFTER);
        if (terminateAfter < 0) {
            throw new ElasticsearchIllegalArgumentException("terminateAfter must be > 0");
        } else if (terminateAfter > 0) {
            countRequest.terminateAfter(terminateAfter);
        }
        client.count(countRequest, new RestBuilderListener<CountResponse>(channel) {
            @Override
            public RestResponse buildResponse(CountResponse response, XContentBuilder builder) throws Exception {
                builder.startObject();
View Full Code Here

Examples of org.elasticsearch.search.builder.SearchSourceBuilder.terminateAfter()

            int terminateAfter = request.paramAsInt("terminate_after",
                    SearchContext.DEFAULT_TERMINATE_AFTER);
            if (terminateAfter < 0) {
                throw new ElasticsearchIllegalArgumentException("terminateAfter must be > 0");
            } else if (terminateAfter > 0) {
                searchSourceBuilder.terminateAfter(terminateAfter);
            }
        }

        String sField = request.param("fields");
        if (sField != null) {
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.