**WARNING**: There are use cases for this, so we might consider not removing the feature after all, but simply ensuring it works correctly. See HSEARCH-1112.
Follow-up on HSEARCH-2547.
We don't prevent upper-level restrictions to be broader than nested restrictions. For instance:
{code}
@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") // Include only "a.foo" private A a; }
@Entity @Indexed private static class C { @Id @GeneratedValue private Long id;
@OneToOne @IndexedEmbedded(includePaths = { "a.foo", "a.bar" }) // Try to include "b.a.bar": this should not work, since "a.bar" is not included in b private B b; } {code}
This *will* include {{b.a.bar}} in the resulting document for {{C}}, even though {{a.bar}} is not part of the document for {{B}}. |
|