public void optimize(Class entityType) {
if ( !getDocumentBuildersIndexedEntities().containsKey( entityType ) ) {
throw new SearchException( "Entity not indexed: " + entityType );
}
List<LuceneWork> queue = new ArrayList<LuceneWork>( 1 );
queue.add( new OptimizeLuceneWork( entityType ) );
getBackendQueueProcessorFactory().getProcessor( queue ).run();
}