if (mappings != null && mappings.isObject()) {
for (Iterator<Map.Entry<String, JsonNode>> i = mappings.fields(); i.hasNext(); ) {
Map.Entry<String, JsonNode> field = i.next();
ObjectNode mapping = jsonMapper.createObjectNode();
mapping.put(field.getKey(), field.getValue());
createIndex.addMapping(field.getKey(), jsonMapper.writeValueAsString(mapping));
}
}
boolean ack = createIndex.execute().actionGet().acknowledged();
if (!ack) {