@Entity
@Indexed
private static class A {
@Id
@GeneratedValue
private Long id;
@Field(analyze = Analyze.NO)
private String foo;
@Field(analyze = Analyze.NO)
private String bar;
}
@Entity
@Indexed
private static class B {
@Id
@GeneratedValue
private Long id;
@OneToOne
@IndexedEmbedded(includePaths = "foo") private A a;
}
@Entity
@Indexed
private static class C {
@Id
@GeneratedValue
private Long id;
@OneToOne
@IndexedEmbedded(includePaths = { "a.foo", "a.bar" }) private B b;
}