Author: epbernard
Date: 2007-07-29 10:12:13 -0400 (Sun, 29 Jul 2007)
New Revision: 12843
Modified:
trunk/HibernateExt/search/src/java/org/hibernate/search/util/DirectoryProviderHelper.java
Log:
HSEARCH-103 introduct indexName to override the directoryprovider name
Modified:
trunk/HibernateExt/search/src/java/org/hibernate/search/util/DirectoryProviderHelper.java
===================================================================
---
trunk/HibernateExt/search/src/java/org/hibernate/search/util/DirectoryProviderHelper.java 2007-07-28
21:28:06 UTC (rev 12842)
+++
trunk/HibernateExt/search/src/java/org/hibernate/search/util/DirectoryProviderHelper.java 2007-07-29
14:12:13 UTC (rev 12843)
@@ -72,6 +72,7 @@
public static File determineIndexDir(String directoryProviderName, Properties
properties) {
String indexBase = properties.getProperty( "indexBase", "." );
+ String indexName = properties.getProperty( "indexName", directoryProviderName
);
File indexDir = new File( indexBase );
if ( ! indexDir.exists() ) {
//if the base directory does not exists, create it
@@ -85,7 +86,7 @@
throw new SearchException( "Cannot write into index directory: " + indexBase
);
}
- indexDir = new File( indexDir, directoryProviderName );
+ indexDir = new File( indexDir, indexName );
return indexDir;
}
}
Show replies by date