.threadsForSubsequentFetching(20) //
.startAndWait();
} catch (final InterruptedException ex) {
log.error("Exception encountered while reindexing: " + ex.getMessage(), ex);
}
final SearchFactory searchFactory = fullTextSession.getSearchFactory();
searchFactory.optimize(clazz);
log.info("Re-indexing of " + number + " objects of type " + clazz.getName() + " done.");
return number;
}