我正在为Activity和metaentity编制索引:
活动包含以下字段:
@Table(name = "activity")
@Indexed
public class Activity implements java.io.Serializable {
private Long id;
private Date timeStamp;
private User user;
/*index metaentity inside activity.*/
@IndexedEmbedded
private Metaentity metaentityByEntity;
}
Metaentity表包含以下字段:
public class Metaentity implements java.io.Serializable {
private Long id;
@IndexedEmbedded
private User userByOwner;
//when metaentity changes update activity entity inside the index
@ContainedIn
private Set<Activity> activitiesForProject = new HashSet<Activity>(0);
}
在活动中我想索引 metaentityByEntity 但是当我为metaentity创建索引活动索引时为空。我不知道为什么会出现这个问题。
是否由于在Metaentity课程中我为为活动项目指定了@ContainedIn?