keyType = property.getType(); OPropertyIndexDefinition indexDefinition = new OPropertyIndexDefinition(className, key, keyType); if (collate != null) indexDefinition.setCollate(collate);
final OType keyType = OType.valueOf(keyTypeStr.toUpperCase(Locale.ENGLISH)); loadedIndexDefinition = new OPropertyIndexDefinition(className, propertyName, keyType);
.getIndexManager() .createIndex(className + "." + key, indexType, new OPropertyIndexDefinition(className, key, keyType), cls.getPolymorphicClusterIds(), null);
@Override public OClass call(final OrientGraph g) { String indexType = configuration.getString("type"); OType keyType = (OType) configuration.getProperty("keytype"); String collate = configuration.getString("collate"); ODocument metadata = (ODocument) configuration.getProperty("metadata"); final ODatabaseDocument db = getRawDatabase(); final OSchema schema = db.getMetadata().getSchema(); final OClass cls = schema.getClass(className); final OProperty property = cls.getProperty(key); if (property != null) keyType = property.getType(); OPropertyIndexDefinition indexDefinition = new OPropertyIndexDefinition(className, key, keyType); if (collate != null) indexDefinition.setCollate(collate); db.getMetadata().getIndexManager() .createIndex(className + "." + key, indexType, indexDefinition, cls.getPolymorphicClusterIds(), null, metadata); return null; } };
indexDefinition = new OPropertyRidBagIndexDefinition(oClass.getName(), fieldName); } else indexDefinition = new OPropertyIndexDefinition(oClass.getName(), fieldName, type);