-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: How to force reindexing of association
PostPosted: Wed Oct 06, 2010 7:23 pm 
Newbie

Joined: Fri Jun 11, 2010 3:00 am
Posts: 14
I have a class Space which has association to SpacePermission. The configuration is to re-build index of SpacePermission on change "updatedAt"
or "spaceLastUpdatedDate". But when if I update space permission fields and updateAt fields it is not re-building the indices when both are in same transaction. If the two are in other transactions, it is re-building the indices properly.

Am I missing some configuration here? What changes I should make to update though both are in one transaction?

@Entity
@Indexed(index="Space")
@Boost(value = PortalConstants.BOOST_SPACE)
public class Space extends {
@DocumentId(name = "spaceId")
private Long id;
@Field(name = "spaceName", index = Index.TOKENIZED, store = Store.NO)
@Boost(value = PortalConstants.BOOST_TITLE)
private String name;

@ContainedIn
@OneToOne(mappedBy="spaceLastUpdatedDate", cascade = {CascadeType.PERSIST, CascadeType.REMOVE})
@IndexedEmbedded(depth = 2, prefix = "spacePermission_")
private SpacePermission spacePermission;

@Field(name = "spaceLastUpdatedDate", index = Index.UN_TOKENIZED, store = Store.NO)
@DateBridge(resolution=Resolution.MILLISECOND)
private Date updatedAt;
}


public class SpacePermission extends BaseDAOBean implements java.io.Serializable{

private static final long serialVersionUID = 1L;

@DocumentId
private Long id;
private Space space;
private PermissionMaster memberPermission;

@Field(name = "nonMemberPermissionId", index = Index.UN_TOKENIZED, store = Store.NO)
private String nonMemberPermissionId;

}


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.