优化默认生成的es商品索引结构。解决初次启动时,搜索商品报错
This commit is contained in:
@@ -33,7 +33,7 @@ public class EsGoodsAttribute implements Serializable {
|
||||
/**
|
||||
* 属性名称
|
||||
*/
|
||||
@Field(type = FieldType.Text)
|
||||
@Field(type = FieldType.Text, fielddata = true)
|
||||
private String name;
|
||||
|
||||
/**
|
||||
@@ -45,7 +45,7 @@ public class EsGoodsAttribute implements Serializable {
|
||||
/**
|
||||
* 属性值
|
||||
*/
|
||||
@Field(type = FieldType.Text)
|
||||
@Field(type = FieldType.Text, fielddata = true)
|
||||
private String value;
|
||||
|
||||
|
||||
|
||||
@@ -256,9 +256,11 @@ public class EsGoodsIndex implements Serializable {
|
||||
* @see cn.lili.modules.goods.entity.enums.GoodsTypeEnum
|
||||
*/
|
||||
@ApiModelProperty(value = "商品类型", required = true)
|
||||
@Field(type = FieldType.Text)
|
||||
private String goodsType;
|
||||
|
||||
@ApiModelProperty(value = "商品sku基础分数", required = true)
|
||||
@Field(type = FieldType.Integer)
|
||||
private Integer skuSource;
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user