Package org.elasticsearch.action.admin.indices.template.delete

Examples of org.elasticsearch.action.admin.indices.template.delete.DeleteIndexTemplateRequest.timeout()


        controller.registerHandler(RestRequest.Method.DELETE, "/_template/{name}", this);
    }

    @Override public void handleRequest(final RestRequest request, final RestChannel channel) {
        DeleteIndexTemplateRequest deleteIndexTemplateRequest = new DeleteIndexTemplateRequest(request.param("name"));
        deleteIndexTemplateRequest.timeout(request.paramAsTime("timeout", timeValueSeconds(10)));
        client.admin().indices().deleteTemplate(deleteIndexTemplateRequest, new ActionListener<DeleteIndexTemplateResponse>() {
            @Override public void onResponse(DeleteIndexTemplateResponse response) {
                try {
                    XContentBuilder builder = RestXContentBuilder.restContentBuilder(request);
                    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.