Elasticsearch exception [type=mapper_parsing_exception, reason=No type specified for field [X]

可能原因是实体类属性没有指定映射类型

创建mapping时需要指定field的type,如果不指定则报错
错误

    //这是一个类中的字段
    @Field(store = false)
    private String img;

正确

    @Field(store = false,type = FieldType.Keyword)
    private String img;
原文地址:https://www.cnblogs.com/juyss/p/14040068.html