Let me clarify the scenario a bit
Code:
@Entity @Indexed
@Table(name = "B")
public class B implements java.io.Serializable {
...
@ManyToOne(cascade = { CascadeType.PERSIST ,CascadeType.MERGE,CascadeType.REFRESH }, fetch = FetchType.EAGER)
@org.hibernate.annotations.Cascade(org.hibernate.annotations.CascadeType.SAVE_UPDATE)
@JoinColumn(name = "a_id", nullable = true)
@IndexedEmbedded
private A a;
}
//Defined in a.hbm.xml
@indexed
public class A implements java.io.Serializable {
...
//Cardinality(oneToMany) defined in a.hbm.xml with inverse="true"
@ContainedIn
private Set<B> bs = new HashSet<B>(0);
}
Any change in A, update the indexes of A, but no impact to indexes of B. Insert/Delete are not an issue as they only happen via Object B.
If I remove the @index on A, no hibernateSearch event gets fired. I also tried adding post-update listener to the session.
SearchMapping looks interesting, when is 3.2 GA is expected?