public static FSDirectoryType getType(Properties properties) {
   FSDirectoryType fsDirectoryType;
   String fsDirectoryTypeValue = properties.getProperty(FS_DIRECTORY_TYPE_PROP_NAME);
   if (StringHelper.isNotEmpty(fsDirectoryTypeValue)) {
     try {
       fsDirectoryType = Enum.valueOf(FSDirectoryType.class, fsDirectoryTypeValue.toUpperCase());
     } catch (IllegalArgumentException e) {
       throw new SearchException(
           "Invalid option value for "
               + FS_DIRECTORY_TYPE_PROP_NAME
               + ": "
               + fsDirectoryTypeValue);
     }
   } else {
     fsDirectoryType = AUTO;
   }
   return fsDirectoryType;
 }