Try with this code

OSchema schema = db.getMetadata().getSchema();

OClass oClass = schema.createClass("Place");
oClass.createProperty("name", OType.STRING);
 
OPropertyIndexDefinition op=new OPropertyIndexDefinition("Place", "name", 
OType.STRING);
op.setNullValuesIgnored(false);
OIndexManagerProxy im = db.getMetadata().getIndexManager();
im.createIndex("Place.name", "NOTUNIQUE_HASH_INDEX", op, null, null, null );

Kind regards,
Alessandro

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to