@MappedSuperclass
class BaseContent{
@IndexedEmbedded(includePaths = {"id", "name"}) @ManyToOne
Author author;
}
@Entity @Indexed
class Content extends BaseContent{
@Id @DocumentId
Integer id;
}
@Entity
class Author{
@Id
Integer id;
@Field(store = Store.YES)
String name;
}