* @param properties the configuration properties
* @return the created {@code FSDirectory} instance
* @throws java.io.IOException if an error
*/
public static FSDirectory createFSIndex(File indexDir, Properties properties, ServiceManager serviceManager) throws IOException {
LockFactory lockFactory = createLockFactory( indexDir, properties, serviceManager );
FSDirectoryType fsDirectoryType = FSDirectoryType.getType( properties );
FSDirectory fsDirectory = fsDirectoryType.getDirectory( indexDir, null );
// must use the setter (instead of using the constructor) to set the lockFactory, or Lucene will
// throw an exception if it's different than a previous setting.