public DynamicFSDirectoryProvider(String indexName,Properties indexProps, SearchFactoryImplementor searchFactoryImplementor){
this.indexName=indexName;
try {
directory = FSDirectory.getDirectory( indexName );
} catch (IOException e) {
throw new HibernateException( "Unable to initialize index: " + indexName, e );
}
configureOptimizerStrategy(searchFactoryImplementor, indexProps, this);
configureIndexingParameters(searchFactoryImplementor, indexProps, this);
if ( !searchFactoryImplementor.getLockableDirectoryProviders().containsKey( this ) ) {
searchFactoryImplementor.getLockableDirectoryProviders().put( this, new ReentrantLock() );