GetFieldMappingsResponse.java 文件源码

java
阅读 29 收藏 0 点赞 0 评论 0

项目:Elasticsearch 作者:
/**
 * Returns the mappings of a specific field.
 *
 * @param field field name as specified in the {@link GetFieldMappingsRequest}
 * @return FieldMappingMetaData for the requested field or null if not found.
 */
public FieldMappingMetaData fieldMappings(String index, String type, String field) {
    ImmutableMap<String, ImmutableMap<String, FieldMappingMetaData>> indexMapping = mappings.get(index);
    if (indexMapping == null) {
        return null;
    }
    ImmutableMap<String, FieldMappingMetaData> typeMapping = indexMapping.get(type);
    if (typeMapping == null) {
        return null;
    }
    return typeMapping.get(field);
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号