To test indexing/searching I'm in need of something like flushToIndexes(), too.
The transaction must be rolled back within my test infrastructure. Thus, I'm not able to get any search results due to the missing commit.
Is there a way to trigger the Lucene worker to flush changes to the index?
I've tried:
Code:
SearchFactoryImplementor searchFactoryImpl = ContextHelper.getSearchFactory((Session)getIndexEntityManager().getDelegate());
searchFactoryImpl.getWorker()... //flushToIndexes() is not available there