Package org.elasticsearch.common.xcontent

Examples of org.elasticsearch.common.xcontent.XContentBuilder.startObject()


                    // blocks
                    if (!clusterStateRequest.filterBlocks()) {
                        builder.startObject("blocks");

                        if (!state.blocks().global().isEmpty()) {
                            builder.startObject("global");
                            for (ClusterBlock block : state.blocks().global()) {
                                block.toXContent(builder, request);
                            }
                            builder.endObject();
                        }
View Full Code Here


                            }
                            builder.endObject();
                        }

                        if (!state.blocks().indices().isEmpty()) {
                            builder.startObject("indices");
                            for (Map.Entry<String, ImmutableSet<ClusterBlock>> entry : state.blocks().indices().entrySet()) {
                                builder.startObject(entry.getKey());
                                for (ClusterBlock block : entry.getValue()) {
                                    block.toXContent(builder, request);
                                }
View Full Code Here

                        }

                        if (!state.blocks().indices().isEmpty()) {
                            builder.startObject("indices");
                            for (Map.Entry<String, ImmutableSet<ClusterBlock>> entry : state.blocks().indices().entrySet()) {
                                builder.startObject(entry.getKey());
                                for (ClusterBlock block : entry.getValue()) {
                                    block.toXContent(builder, request);
                                }
                                builder.endObject();
                            }
View Full Code Here

                        builder.endObject();
                    }

                    // nodes
                    if (!clusterStateRequest.filterNodes()) {
                        builder.startObject("nodes");
                        for (DiscoveryNode node : state.nodes()) {
                            builder.startObject(node.id(), XContentBuilder.FieldCaseConversion.NONE);
                            builder.field("name", node.name());
                            builder.field("transport_address", node.address().toString());
View Full Code Here

                    // nodes
                    if (!clusterStateRequest.filterNodes()) {
                        builder.startObject("nodes");
                        for (DiscoveryNode node : state.nodes()) {
                            builder.startObject(node.id(), XContentBuilder.FieldCaseConversion.NONE);
                            builder.field("name", node.name());
                            builder.field("transport_address", node.address().toString());

                            builder.startObject("attributes");
                            for (Map.Entry<String, String> attr : node.attributes().entrySet()) {
View Full Code Here

                        for (DiscoveryNode node : state.nodes()) {
                            builder.startObject(node.id(), XContentBuilder.FieldCaseConversion.NONE);
                            builder.field("name", node.name());
                            builder.field("transport_address", node.address().toString());

                            builder.startObject("attributes");
                            for (Map.Entry<String, String> attr : node.attributes().entrySet()) {
                                builder.field(attr.getKey(), attr.getValue());
                            }
                            builder.endObject();
View Full Code Here

                        builder.endObject();
                    }

                    // meta data
                    if (!clusterStateRequest.filterMetaData()) {
                        builder.startObject("metadata");

                        builder.startObject("templates");
                        for (IndexTemplateMetaData templateMetaData : state.metaData().templates().values()) {
                            builder.startObject(templateMetaData.name(), XContentBuilder.FieldCaseConversion.NONE);
View Full Code Here

                    // meta data
                    if (!clusterStateRequest.filterMetaData()) {
                        builder.startObject("metadata");

                        builder.startObject("templates");
                        for (IndexTemplateMetaData templateMetaData : state.metaData().templates().values()) {
                            builder.startObject(templateMetaData.name(), XContentBuilder.FieldCaseConversion.NONE);

                            builder.field("template", templateMetaData.template());
                            builder.field("order", templateMetaData.order());
View Full Code Here

                    if (!clusterStateRequest.filterMetaData()) {
                        builder.startObject("metadata");

                        builder.startObject("templates");
                        for (IndexTemplateMetaData templateMetaData : state.metaData().templates().values()) {
                            builder.startObject(templateMetaData.name(), XContentBuilder.FieldCaseConversion.NONE);

                            builder.field("template", templateMetaData.template());
                            builder.field("order", templateMetaData.order());

                            builder.startObject("settings");
View Full Code Here

                            builder.startObject(templateMetaData.name(), XContentBuilder.FieldCaseConversion.NONE);

                            builder.field("template", templateMetaData.template());
                            builder.field("order", templateMetaData.order());

                            builder.startObject("settings");
                            Settings settings = settingsFilter.filterSettings(templateMetaData.settings());
                            for (Map.Entry<String, String> entry : settings.getAsMap().entrySet()) {
                                builder.field(entry.getKey(), entry.getValue());
                            }
                            builder.endObject();
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.