Hi all,
I would like to store in one index the data of many classes. I wrote a specific class bridge to do this on the main class (Bibnnotice) who refererence other classes. Also I would like to update this index when a referenced class is updated (Bibntitre). I don't want that referenced class
store own data in her own index.
My problem, if I use @ContainedIn annotation on bibnnotice attribute in Bibntitre and I don't add @indexed on Bibntitre, a modification on Bibntitre instance not update Bibnnotice index. Also I don't want to use @IndexEmbedded on my bibntitres attribute, because I do a treatment on data stored.
See a piece of source code below:
Code:
@Entity
@Table(name="BIB_N_NOTICE")
@Indexed
@ClassBridge(name="noticeIndexation",
index=Index.TOKENIZED,
store=Store.YES,
impl = BibnnoticeIndexationClassBridge.class)
public class Bibnnotice extends AfiHomeAnnotations implements java.io.Serializable
{
@DocumentId
private Integer id;
//@IndexedEmbedded
private Set<Bibntitre> bibntitres = new HashSet<Bibntitre>(0);
....
}@Entity
@Table(name = "BIB_N_TITRE")
@Indexed
public class Bibntitre extends AfiHomeAnnotations implements java.io.Serializable {
//@DocumentId
private Integer id;
@ContainedIn
private Bibnnotice bibnnotice;
...
}
Thanks for an help.
JPP