final String propertyName = indexName.substring(pos + 1);
final String keyTypeStr = config.field(OIndexInternal.CONFIG_KEYTYPE);
if (keyTypeStr == null)
throw new OIndexException("Can not convert from old index model to new one. " + "Index key type is absent.");
final OType keyType = OType.valueOf(keyTypeStr.toUpperCase(Locale.ENGLISH));
loadedIndexDefinition = new OPropertyIndexDefinition(className, propertyName, keyType);
config.removeField(OIndexInternal.CONFIG_AUTOMATIC);
config.removeField(OIndexInternal.CONFIG_KEYTYPE);
} else if (config.field(OIndexInternal.CONFIG_KEYTYPE) != null) {
final String keyTypeStr = config.field(OIndexInternal.CONFIG_KEYTYPE);
final OType keyType = OType.valueOf(keyTypeStr.toUpperCase(Locale.ENGLISH));
loadedIndexDefinition = new OSimpleKeyIndexDefinition(keyType);
config.removeField(OIndexInternal.CONFIG_KEYTYPE);
}