[hibernate-issues] [Hibernate-JIRA] Updated: (HSEARCH-1020) Regression in 3.4: index not updated after updating a collection (Guillaume Smet)
Sanne Grinovero (JIRA)
noreply at atlassian.com
Fri Jan 6 12:22:10 EST 2012
[ http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-1020?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sanne Grinovero updated HSEARCH-1020:
-------------------------------------
Fix Version/s: (was: 3.4.2)
(was: 4.1)
4.1.0.Alpha1
> Regression in 3.4: index not updated after updating a collection (Guillaume Smet)
> ---------------------------------------------------------------------------------
>
> Key: HSEARCH-1020
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-1020
> Project: Hibernate Search
> Issue Type: Bug
> Affects Versions: 3.4.1.Final, 4.0.0.Final
> Reporter: Guillaume Smet
> Assignee: Sanne Grinovero
> Fix For: 4.1.0.Alpha1
>
> Attachments: collection-update-indexation-bug.tar.gz
>
>
> Hi,
> I know it's not exactly documented but, before 3.4, it was possible to index a collection with the @Field annotation and a FieldBridge (in our case, a FieldBridge which indexes all the ids of the linked entities).
> We use it a lot instead of @IndexedEmbedded because it allows us not to bloat our index when we want to index a collection containing indexed entities (@IndexedEmbedded integrates all the fields of the linked entities in the index of the main entity - which is often not needed in our case: we have autocomplete field for our search so we only need the id of the linked entities).
> Starting with 3.4, it doesn't work anymore: the entity is correctly indexed when created but, if we update only the collection, the index is not updated.
> The problem is in AbstractDocumentBuilder.isCollectionRoleExcluded(String collectionRole) which is called to check if the collection update should trigger a reindex. This method should also consider the collections having a @Field annotation, not just the collections with @IndexedEmbedded or @ContainedIn.
> FWIW, if somebody else has this problem, as a workaround, I use a non default boost strategy to force the reindex but it would be nice to have it fixed because it's really a useful pattern.
> If needed, we can provide a test case.
> Thanks.
> --
> Guillaume
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list