Examples of startArray()


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

        builder.endArray();
      }
    }
    List<String> pkeys = getAllIndexedSpaceKeys();
    if (pkeys != null) {
      builder.startArray("indexed_spaces");
      for (String spaceKey : pkeys) {
        builder.startObject();
        builder.field(SpaceIndexingInfo.DOCFIELD_SPACE_KEY, spaceKey);
        SpaceIndexingInfo lastIndexing = getLastSpaceIndexingInfo(spaceKey);
        if (lastIndexing != null) {
View Full Code Here

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

                    XContentBuilder builder = jsonBuilder().startObject();
                    builder.field("id", Integer.toString(counter));
                    builder.field("s_value", sValues[counter % sValues.length]);
                    builder.field("l_value", lValues[counter % lValues.length]);

                    builder.startArray("sm_value");
                    for (int k = 0; k < NUMBER_OF_MULTI_VALUE_TERMS; k++) {
                        builder.value(sValues[ThreadLocalRandom.current().nextInt(sValues.length)]);
                    }
                    builder.endArray();
View Full Code Here

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

                    for (int k = 0; k < NUMBER_OF_MULTI_VALUE_TERMS; k++) {
                        builder.value(sValues[ThreadLocalRandom.current().nextInt(sValues.length)]);
                    }
                    builder.endArray();

                    builder.startArray("lm_value");
                    for (int k = 0; k < NUMBER_OF_MULTI_VALUE_TERMS; k++) {
                        builder.value(lValues[ThreadLocalRandom.current().nextInt(sValues.length)]);
                    }
                    builder.endArray();
View Full Code Here

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

                                builder.field(entry.getKey());
                                builder.map(mapping);
                            }
                            builder.endObject();

                            builder.startArray("aliases");
                            for (String alias : indexMetaData.aliases().keySet()) {
                                builder.value(alias);
                            }
                            builder.endArray();
View Full Code Here

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

                        builder.startObject("indices");
                        for (IndexRoutingTable indexRoutingTable : state.routingTable()) {
                            builder.startObject(indexRoutingTable.index(), XContentBuilder.FieldCaseConversion.NONE);
                            builder.startObject("shards");
                            for (IndexShardRoutingTable indexShardRoutingTable : indexRoutingTable) {
                                builder.startArray(Integer.toString(indexShardRoutingTable.shardId().id()));
                                for (ShardRouting shardRouting : indexShardRoutingTable) {
                                    jsonShardRouting(builder, shardRouting);
                                }
                                builder.endArray();
                            }
View Full Code Here

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

                    }

                    // routing nodes
                    if (!clusterStateRequest.filterRoutingTable()) {
                        builder.startObject("routing_nodes");
                        builder.startArray("unassigned");
                        for (ShardRouting shardRouting : state.readOnlyRoutingNodes().unassigned()) {
                            jsonShardRouting(builder, shardRouting);
                        }
                        builder.endArray();
View Full Code Here

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

                        }
                        builder.endArray();

                        builder.startObject("nodes");
                        for (RoutingNode routingNode : state.readOnlyRoutingNodes()) {
                            builder.startArray(routingNode.nodeId(), XContentBuilder.FieldCaseConversion.NONE);
                            for (ShardRouting shardRouting : routingNode) {
                                jsonShardRouting(builder, shardRouting);
                            }
                            builder.endArray();
                        }
View Full Code Here

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

                        builder.endObject();
                    }

                    if (!clusterStateRequest.filterRoutingTable()) {
                        builder.startArray("allocations");
                        for (Map.Entry<ShardId, List<AllocationExplanation.NodeExplanation>> entry : state.allocationExplanation().explanations().entrySet()) {
                            builder.startObject();
                            builder.field("index", entry.getKey().index().name());
                            builder.field("shard", entry.getKey().id());
                            builder.startArray("explanations");
View Full Code Here

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

                        builder.startArray("allocations");
                        for (Map.Entry<ShardId, List<AllocationExplanation.NodeExplanation>> entry : state.allocationExplanation().explanations().entrySet()) {
                            builder.startObject();
                            builder.field("index", entry.getKey().index().name());
                            builder.field("shard", entry.getKey().id());
                            builder.startArray("explanations");
                            for (AllocationExplanation.NodeExplanation nodeExplanation : entry.getValue()) {
                                builder.field("desc", nodeExplanation.description());
                                if (nodeExplanation.node() != null) {
                                    builder.startObject("node");
                                    builder.field("id", nodeExplanation.node().id());
View Full Code Here

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

                builder.field("redirect", page.isRedirect());
                builder.field("special", page.isSpecialPage());
                builder.field("stub", page.isStub());
                builder.field("disambiguation", page.isDisambiguationPage());

                builder.startArray("category");
                for (String s : page.getCategories()) {
                    builder.value(s);
                }
                builder.endArray();
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.