[JIRA] (HSEARCH-4718) Do not reindex when irrelevant changes occur inside embedded objects
by Yoann Rodière (JIRA)
Yoann Rodière ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%... ) *created* an issue
Hibernate Search ( https://hibernate.atlassian.net/browse/HSEARCH?atlOrigin=eyJpIjoiZjJjM2Rl... ) / Improvement ( https://hibernate.atlassian.net/browse/HSEARCH-4718?atlOrigin=eyJpIjoiZjJ... ) HSEARCH-4718 ( https://hibernate.atlassian.net/browse/HSEARCH-4718?atlOrigin=eyJpIjoiZjJ... ) Do not reindex when irrelevant changes occur inside embedded objects ( https://hibernate.atlassian.net/browse/HSEARCH-4718?atlOrigin=eyJpIjoiZjJ... )
Issue Type: Improvement Assignee: Unassigned Components: mapper-orm Created: 12/Oct/2022 05:11 AM Fix Versions: 7.x-backlog Priority: Major Reporter: Yoann Rodière ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%... )
Whenever an entity is modified and something changes in an embedded object, Hibernate ORM will trigger an event that mentions “that embedded object changed”, but it won't tell us *what* changed exactly inside that embeddable ( org.hibernate.event.spi.PostUpdateEvent#dirtyProperties contains the index of the embeddable property, nothing more).
As a result, if the indexing of an entity depends on one property (P1) inside an embeddable, and another property (P2) in that embeddable changes, Hibernate Search currently has to reindex the entity “just to be safe”, because it doesn’t know whether P1 changed or P2 changed, just that “either P1 or P2 changed”. In short, we’ll reindex more often than necessary.
This is actually a limitation of Hibernate ORM, so we should investigate whether we can improve things in Hibernate ORM itself. Maybe it’s already solved in Hibernate ORM 6? I doubt that, though.
( https://hibernate.atlassian.net/browse/HSEARCH-4718#add-comment?atlOrigin... ) Add Comment ( https://hibernate.atlassian.net/browse/HSEARCH-4718#add-comment?atlOrigin... )
Get Jira notifications on your phone! Download the Jira Cloud app for Android ( https://play.google.com/store/apps/details?id=com.atlassian.android.jira.... ) or iOS ( https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=EmailN... ) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100208- sha1:399748d )
2 years, 3 months