It is quite difficult to find information on how to get a SearchIntegrator when all you have available is a SessionFactory, so a public API would definitely be appreciated. My initial code was based on http://lifeinide.com/post/2015-06-20-distributed-hibernate-search-with-apachemq-and-spring/ and modified to keep the same logic compatible with the new API. I didnt even question whether I really needed a Hibernate Session in order to get to the Search Integrator. When using such an approach where you need a live Hibernate Session, then its quite apparent that you somehow need to clean them up later in order to avoid leaks. |