优化默认生成的es商品索引结构。解决初次启动时,搜索商品报错

This commit is contained in:
paulGao 2022-04-27 18:15:11 +08:00
parent 1cd74cc26a
commit 66e6272571
3 changed files with 5 additions and 2 deletions

View File

@ -121,6 +121,7 @@ ignored:
- /source/**
- /common/common/slider/**
- /common/common/sms/**
- /common/common/logo
- /druid/**
- /swagger-ui.html
- /doc.html

View File

@ -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;

View File

@ -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;
/**