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

mapping to keyword snapshot

the opportunityId above is mapped to keyword other than the long type. Anyone knows how to map the opportunityId to long type when @Id annotated at the same time since I'd like to do stats metrics aggregation on this property?

1

1 Answer 1

1

Stats aggregation can be only applied to numerics. Change the mappings works fine. But @Id will be mapped to keyword , still no luck.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.