[hibernate-dev] [Search] Index embedded and id property of embedded entity
Emmanuel Bernard
emmanuel at hibernate.org
Tue May 27 06:19:47 EDT 2014
On 29 Apr 2014, at 20:43, Hardy Ferentschik <hardy at hibernate.org> wrote:
> On 29 Jan 2014, at 15:24, Sanne Grinovero <sanne at hibernate.org> wrote:
>
>>>> But this forces you to list all fields to include explicitly in case you want the id added, but otherwise are happy
>>>> to just use the default @IndexedEmbedded.
>>>
>>> I think we should keep the id with the default @IndexedEmbedded. It
>>> was weird to include the id when the includePath didn't ask for it but
>>> it would be weird to not include the id with the default
>>> @IndexedEmbedded.
>>
>> It's not an indexed field, I don't think it was ever meant to be in
>> the index but rather a side effect of our recursion.. as we obviously
>> need the id of the root element.
>
> Nope, the code is quite explicit. It contains a if/else statement checking whether
> we are processing the root entity and in the else part the comment says:
> “// component should index their document id”
>
> This is also not just an outcome of the metadata refactoring, since this if statement
> and comment also has been there in the DocumentBuilder code [1]
>
> So it has been an explicit choice at some point of time.
Correct.
More information about the hibernate-dev
mailing list