1

我正在索引活动和元实体:

活动包含以下字段:

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

元实体表包含以下字段:

      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 类中我为Set of activitiesForProject指定了 @ContainedIn吗?

4

0 回答 0