class ESUtils {

    public static String createMappingWithParent(String esUrl, String index, String type, String parentType)
            throws Exception {
        String url = new StringBuilder(esUrl).append("/").append(index).append("/").append(MAPPING).append("/")
                .append(type).toString();
        String requestBody = "  {\"_parent\": { \"type\": \"" + parentType + "\"}}";
        // String requestBody =
        // "{\"mappings\":{\"input_type\":{\"dynamic_templates\":[{\"notanalyzed\":{\"match\":\"*\",\"match_mapping_type\":\"string\",\"mapping\":{\"type\":\"string\",\"index\":\"not_analyzed\"}}}]}}}";
        return CommonUtils.doHttpPut(url, requestBody);
    }

}