So, I am curious to find out how does Hibernate Search keep my data in sync.
Let us assume we have parent entity ‘Author’ which is Indexed, and two child entities ‘Book’ and a ‘Pen’ which are stored as List and are IndexEmbedded in Author and are NOT separate indexes with the typical one to many relationship. (One Author can have one or more child entities).
Here is the thing I am having a problem with:
When I update the field in Book entity , it seems that Hibernate Search, before updating the data to an index, does a select statement in which it joins parent(‘Author’) with the child ‘Pen’, although I did not make any changes to that Entity. I understand that it needs to know on which index to store the data hence the joining ‘Book’ with ‘Author’ is fine.
But why does it query the other child entity ?
You see where I am going with this, in production I have a parent Entity with let us say 100+ children entities. I do not want to query the ones that are not updated.
Does it send entire index structure every time it needs to update an index ?
I want to add also that I am new to this technology, so if there is something I did not understand correctly, please say so.