manager.setSimilarity( newSimilarity );
}
private IndexManager createDirectoryManager(String indexName, Properties indexProps, WorkerBuildContext context) {
String indexManagerName = indexProps.getProperty( INDEX_MANAGER_IMPL_NAME, DEFAULT_INDEX_MANAGER_NAME);
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 );
}
}