} else if (mapping instanceof Map) {
requestBuilder.setSource((Map) mapping);
} else if (mapping instanceof XContentBuilder) {
requestBuilder.setSource((XContentBuilder) mapping);
}
return requestBuilder.execute().actionGet().isAcknowledged();
}
@Override
public Map getMapping(String indexName, String type) {
Assert.notNull(indexName, "No index defined for putMapping()");