manager.setSimilarity( newSimilarity );
}
private IndexManager createDirectoryManager(String indexName, Properties indexProps, Class<?> entity, WorkerBuildContext context) {
String indexManagerName = indexProps.getProperty( INDEXMANAGER_IMPL_NAME, "transactional" );
final IndexManager manager;
if ( StringHelper.isEmpty( indexManagerName ) ) {
manager = new DirectoryBasedIndexManager();
}
else {
String longName = defaultIndexManagerClasses.get( indexManagerName );
if ( longName == null ) {
longName = indexManagerName;
}
manager = ClassLoaderHelper.instanceFromName( IndexManager.class, longName,
IndexManagerHolder.class, "index manager" );
}
try {
manager.initialize( indexName, indexProps, context );
return manager;
} catch (Exception e) {
throw log.unableToInitializeIndexManager( indexName, e );
}
}