We're updating the issue view to help you get more done. 

@IndexedEmbedded.includePaths should not allow to pick paths that were excluded from the embedded entity

Description

*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. => It is already done in 6 and throroughly tested. Let’s push some comments to these tests to link to this ticket, close this ticket, and reconsider when we have a look at HSEARCH-1112.

Follow-up on HSEARCH-2547.

We don't prevent upper-level restrictions to be broader than nested restrictions. For instance:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 @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; }

This will include b.a.bar in the resulting document for C, even though a.bar is not part of the document for B.

Environment

None

Status

Assignee

Yoann Rodière

Reporter

Yoann Rodière

Labels

None

Suitable for new contributors

None

Feedback Requested

None

Components

Fix versions

Affects versions

5.6.0.CR1

Priority

Major