public void index(String entity) {
Class<?> clazz = getEntityClass( entity );
SessionFactory factory = getSessionFactory();
Session session = factory.openSession();
FullTextSession fulltextSession = Search.getFullTextSession( session );
try {
fulltextSession.createIndexer( clazz )
.batchSizeToLoadObjects( batchSize )
.cacheMode( CacheMode.NORMAL )
.threadsToLoadObjects( numberOfObjectLoadingThreads )
.threadsForSubsequentFetching( numberOfFetchingThreads )
.startAndWait();