How to map Nested objects in Spring data elasticsearch
I have object 1 having list of object 2. How to efficiently map this so that querying back elasticsearch is easy ? I want to retrieve object 2 based on ID.
@Document(indexName = xxx, type = xxx)
public class Object1 {
private List<Obj2> lstObj2;
}
public class Obj2 {
private Long id;
}