hardy.ferentschik wrote:
There should no issue with nested @IndexedEmbedded configurations. The important thing to remember is that the session/transaction which loaded the initial entity has to be open during the indexing process (during indexing the lazy loaded properties have to be fetched!). In a web framework you often achieve this via the open session in view pattern.
It it hard to provide more help without seeing your actual annotated classes and how you index them (the code between opening and closing of the session). However, this topic has been discussed many times on this forum. Just search for LazyInitializationException and you should get some more pointers. In most cases the problem is wrong session handling or wrong transaction demarcation.
--Hardy
I haven't tried it with individually indexing entities, but I'm getting it when I try to use the MassIndexer. And I do have the open session in view filter going, so that's not the problem. I'll probably try fetching them all manually and indexing them, but at the moment the problem is with MassIndexer.