Package org.elasticsearch.common.xcontent

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


          builder.field("last_indexing");
          lastIndexing.buildDocument(builder, false, true);
        }
        builder.endObject();
      }
      builder.endArray();
    }
    builder.endObject();
    return builder.string();
  }
View Full Code Here


                    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();

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

                    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();

                    builder.endObject();

                    request.add(Requests.indexRequest("test").type("type1").id(Integer.toString(counter))
                            .source(builder));
View Full Code Here

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

                            builder.endObject();
                        }
                        builder.endObject();
View Full Code Here

                            for (IndexShardRoutingTable indexShardRoutingTable : indexRoutingTable) {
                                builder.startArray(Integer.toString(indexShardRoutingTable.shardId().id()));
                                for (ShardRouting shardRouting : indexShardRoutingTable) {
                                    jsonShardRouting(builder, shardRouting);
                                }
                                builder.endArray();
                            }
                            builder.endObject();
                            builder.endObject();
                        }
                        builder.endObject();
View Full Code Here

                        builder.startObject("routing_nodes");
                        builder.startArray("unassigned");
                        for (ShardRouting shardRouting : state.readOnlyRoutingNodes().unassigned()) {
                            jsonShardRouting(builder, shardRouting);
                        }
                        builder.endArray();

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

                        for (RoutingNode routingNode : state.readOnlyRoutingNodes()) {
                            builder.startArray(routingNode.nodeId(), XContentBuilder.FieldCaseConversion.NONE);
                            for (ShardRouting shardRouting : routingNode) {
                                jsonShardRouting(builder, shardRouting);
                            }
                            builder.endArray();
                        }
                        builder.endObject();

                        builder.endObject();
                    }
View Full Code Here

                                    builder.field("id", nodeExplanation.node().id());
                                    builder.field("name", nodeExplanation.node().name());
                                    builder.endObject();
                                }
                            }
                            builder.endArray();
                            builder.endObject();
                        }
                        builder.endArray();
                    }
View Full Code Here

                                }
                            }
                            builder.endArray();
                            builder.endObject();
                        }
                        builder.endArray();
                    }


                    builder.endObject();
                    channel.sendResponse(new XContentRestResponse(request, RestStatus.OK, builder));
View Full Code Here

                builder.startArray("category");
                for (String s : page.getCategories()) {
                    builder.value(s);
                }
                builder.endArray();

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