this.entityIndexBinders = searchFactory.getIndexBindingForEntity();
}
private void index(Session session, Object entity) {
try {
final InstanceInitializer sessionInitializer = new HibernateSessionLoadingInitializer(
(SessionImplementor) session );
final ConversionContext contextualBridge = new ContextualExceptionBridgeHelper();
// trick to attach the objects to session:
session.buildLockRequest( LockOptions.NONE ).lock( entity );