private ElasticsearchIndexMappingInfo getMappingInfo(List<ElasticsearchFieldInfo> fieldsInfo) {
        Map<String, IndexField> fields = Maps.newHashMap();
        for (ElasticsearchFieldInfo field : fieldsInfo) {
            IndexField indexField = new IndexField();
            fields.put(field.getFieldName(), indexField);
            indexField.setType(field.getFieldType());
            if (field.getFieldType().equals("text")) {
                if (StringUtils.isNotEmpty(field.getAnalyzer())) {
                    indexField.setAnalyzer(field.getAnalyzer());
                }
                if (StringUtils.isNotEmpty(field.getSearchAnalyzer())) {
                    indexField.setSearchAnalyzer(field.getSearchAnalyzer());
                }
            } else if (field.getFieldType().equals("date")) {
                if (StringUtils.isNotEmpty(field.getFieldFormat())) {
                    indexField.setFormat(field.getFieldFormat());
                }
            } else if (field.getFieldType().equals("scaled_float")) {
                if (StringUtils.isNotEmpty(field.getScalingFactor())) {
                    indexField.setScalingFactor(field.getScalingFactor());
                }
            }
        }
        return ElasticsearchIndexMappingInfo.builder().mappings(IndexMappings.builder()
                .properties(fields).build()).build();
    }
Get mapping info.

@param fieldsInfo The fields info of Elasticsearch
@return elasticsearch index mappings object {@link ElasticsearchIndexMappingInfo}
@throws IOException The exception may throws
inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/resource/sink/es/ElasticsearchApi.java