Package org.elasticsearch.action.admin.indices.flush

Examples of org.elasticsearch.action.admin.indices.flush.FlushRequest.force()


        c.admin().indices().updateSettings(new UpdateSettingsRequest(index).settings(sb.build())).actionGet();
    }

    public void flush(String index) {
        FlushRequest flush = new FlushRequest(index);
        flush.force(true); // Just flushes. Even if it is not necessary.
        flush.full(false);

        c.admin().indices().flush(new FlushRequest(index).force(true)).actionGet();
    }
View Full Code Here


    public void handleRequest(final RestRequest request, final RestChannel channel, final Client client) {
        FlushRequest flushRequest = new FlushRequest(Strings.splitStringByCommaToArray(request.param("index")));
        flushRequest.listenerThreaded(false);
        flushRequest.indicesOptions(IndicesOptions.fromRequest(request, flushRequest.indicesOptions()));
        flushRequest.full(request.paramAsBoolean("full", flushRequest.full()));
        flushRequest.force(request.paramAsBoolean("force", flushRequest.force()));
        flushRequest.waitIfOngoing(request.paramAsBoolean("wait_if_ongoing", flushRequest.waitIfOngoing()));
        client.admin().indices().flush(flushRequest, new RestBuilderListener<FlushResponse>(channel) {
            @Override
            public RestResponse buildResponse(FlushResponse response, XContentBuilder builder) throws Exception {
                builder.startObject();
View Full Code Here

    public void handleRequest(final RestRequest request, final RestChannel channel, final Client client) {
        FlushRequest flushRequest = new FlushRequest(Strings.splitStringByCommaToArray(request.param("index")));
        flushRequest.listenerThreaded(false);
        flushRequest.indicesOptions(IndicesOptions.fromRequest(request, flushRequest.indicesOptions()));
        flushRequest.full(request.paramAsBoolean("full", flushRequest.full()));
        flushRequest.force(request.paramAsBoolean("force", flushRequest.force()));
        flushRequest.waitIfOngoing(request.paramAsBoolean("wait_if_ongoing", flushRequest.waitIfOngoing()));
        client.admin().indices().flush(flushRequest, new RestBuilderListener<FlushResponse>(channel) {
            @Override
            public RestResponse buildResponse(FlushResponse response, XContentBuilder builder) throws Exception {
                builder.startObject();
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.