@Document(indexName = "opportunity_data", type = "opportunities", createIndex = false)
@Setting(settingPath = "/search/settings.json")
@Data
@Accessors(chain = true)
@JsonIgnoreProperties(value = {"id"}, allowGetters = true, allowSetters = false)
public class OpportunityVo extends AbstractGenericVo<Opportunity> {
@Id
@Field(type = FieldType.Long)
private Long opportunityId;
@Field(type = FieldType.Long)
private Long prospectId;
@Field(type = FieldType.Text)
private String prospectName;
}
上面的opportunityId
映射到keyword
类型以外的long
。由于我想对此属性进行long
指标汇总,因此有人知道如何在同时注释@Id
时将 opportunityId 映射到stats
类型吗?
答案 0 :(得分:0)
统计信息汇总只能应用于数字。更改映射工作正常。但是@Id将映射到关键字,仍然没有运气。