Package org.elasticsearch.common.xcontent

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


                        builder.endObject();
                    }
                    builder.endArray();
                }
                if (status.getContributors() != null) {
                    builder.array("contributor", status.getContributors());
                }
                if (status.getGeoLocation() != null) {
                    builder.startObject("location");
                    builder.field("lat", status.getGeoLocation().getLatitude());
                    builder.field("lon", status.getGeoLocation().getLongitude());
View Full Code Here


            Map<String, Object> map = new LinkedHashMap<String, Object>(2);
            map.put("name", entry.getKey());
            map.put("lastRead", entry.getValue());
            listOfMaps.add(map);
        }
        b.array(TOPICS, listOfMaps.toArray(new Map[listOfMaps.size()]));
        return b;
    }

    @Override
    public JUser readDoc(String idAsStr, long version, Map<String, Object> doc) {
View Full Code Here

                                logger.debug("\t\tvalue: [{}]", value.toString());
                                fieldValues.add(value.toString());
                            }
                            String fieldName = resolveFieldName(id);
                            if(fieldValues.size() > 1){
                                builder.array(fieldName, fieldValues.toArray());
                            } else {
                                if (!"_id".equals(fieldName)) {
                                    builder.field(fieldName, fieldValues.get(0));
                                } else {
                                    indexRequest.id(fieldValues.get(0));
View Full Code Here

                                builder.endObject();
                            }
                            builder.endArray();
                        }
                        if (status.getContributors() != null && status.getContributors().length > 0) {
                            builder.array("contributor", status.getContributors());
                        }
                        if (status.getGeoLocation() != null) {
                            if (geoAsArray) {
                                builder.startArray("location");
                                builder.value(status.getGeoLocation().getLongitude());
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.