Package org.openstreetmap.osmosis.plugin.elasticsearch.model.entity

Examples of org.openstreetmap.osmosis.plugin.elasticsearch.model.entity.ESNode.toJson()


    BulkRequestBuilder bulkRequest = client.prepareBulk();
    for (Node node : nodes) {
      try {
        ESNode esNode = ESNode.Builder.buildFromEntity(node);
        bulkRequest.add(client.prepareIndex(indexName, esNode.getEntityType().getIndiceName(), esNode.getIdString())
            .setSource(esNode.toJson()));
      } catch (Exception exception) {
        LOG.warning(String.format("Unable to add Entity %s to bulk request, cause: %s",
            node.getId(), exception.getMessage()));
      }
    }
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.