Metadata creation tries to process @Id property even though the entity is not indexed
Description
follows up on
relates to
Activity
Hardy Ferentschik June 11, 2014 at 6:30 PM
Sanne Grinovero April 28, 2014 at 10:23 PM
Debated on the mailing list: http://lists.jboss.org/pipermail/hibernate-dev/2014-April/011376.html
Hardy Ferentschik April 28, 2014 at 1:18 PMEdited
, so what are we saying here? If you use indexed embedded and the embedded entity itself is not indexed, then a potential @Id
is ignored and to include this field into the index you need to add a @Field
. If the embedded entity is indexed, the @Id
or @DocumentId
property gets automatically added. Correct? Or would be require a dedicated @Field
for including the id of an embedded entity, no matter what?
If we want to change this, I guess now would be a good time.
Hardy Ferentschik April 22, 2014 at 6:46 PM
So should we disable this then for Search 5? +1 from me
Sanne Grinovero January 29, 2014 at 3:04 PM
A reminder from IRC chat: current Hibernate Search versions actually index the id
of embedded components as well, and some users rely on that.
We agreed this shouldn't happen by default, but that is a semantic change that should be folded in the 5.0 stream.
For example:
This will throw an exception, because the field bridge for
id
cannot be guessed. However,id
is not relevant in this case. Only the fieldfoo
gets indexed embedded intoA
.