// need to merge the _meta part of the mapping mapping before-hand because ES doesn't
// update the _meta column recursively. Instead it is overwritten and therefore partitioned by
// and collection_type information would be lost.
String[] indexNames = getIndexNames(analysis.table(), analysis.partitionName().orNull());
PutMappingRequest request = new PutMappingRequest();
request.indices(indexNames);
request.type(Constants.DEFAULT_MAPPING_TYPE);
IndexMetaData indexMetaData = clusterService.state().getMetaData().getIndices().get(indexNames[0]);
try {
Map mergedMeta = (Map)indexMetaData.getMappings()
.get(Constants.DEFAULT_MAPPING_TYPE)