Package org.elasticsearch.action.admin.indices.alias.get

Examples of org.elasticsearch.action.admin.indices.alias.get.GetAliasesRequest.aliases()


            public RestResponse buildResponse(GetAliasesResponse response, XContentBuilder builder) throws Exception {
                // empty body, if indices were specified but no aliases were
                if (indices.length > 0 && response.getAliases().isEmpty()) {
                    return new BytesRestResponse(OK, builder.startObject().endObject());
                } else if (response.getAliases().isEmpty()) {
                    String message = String.format(Locale.ROOT, "alias [%s] missing", toNamesString(getAliasesRequest.aliases()));
                    builder.startObject()
                            .field("error", message)
                            .field("status", RestStatus.NOT_FOUND.getStatus())
                            .endObject();
                    return new BytesRestResponse(RestStatus.NOT_FOUND, builder);
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.