I have an issue, which I think should be easily solved.
I use Hibernate Search to index @Entitiy classes which have relations to other entities.
Whenever an entity points to another entity that should be indexed as well, say the User who uploaded a particular Photo, I use @IndexedEmbedded, which has worked absolutely fine with HSearch's automatic indexing.
However, I also have some @IndexedEmbeded annotations set on @ManyToOne relations. Imagine a photo having a list of related comments. These ones are by default lazily-loaded, i.e. not fetched from the DB, until actually needed. I noticed that when I add a comment, no matter how much time passes, it does not get indexed, until I do a manual reindexing. Then everything works fine. I have not observed this with any of the other IndexedEmbedded relations that i have, for instance, if I change the location of a photo, in a few minutes, it gets into the index and is perfectly searcheable.
Any explanation? Solution?