EntityIndexBinder entityIndexBinding = entityIndexBinders.get( clazz );
// it might be possible to receive not-indexes subclasses of the currently indexed type;
// being not-indexed, we skip them.
// FIXME for improved performance: avoid loading them in an early phase.
if ( entityIndexBinding != null ) {
EntityIndexingInterceptor interceptor = entityIndexBinding.getEntityIndexingInterceptor();
if ( isNotSkippable( interceptor, entity ) ) {
Serializable id = session.getIdentifier( entity );
AddLuceneWork addWork = createAddLuceneWork( entity, sessionInitializer, conversionContext, id, clazz,
entityIndexBinding );
backend.enqueueAsyncWork( addWork );