final OClass mapper = database.getMetadata().getSchema().getClass("Mapper");
mapper.createProperty("id", OType.STRING);
mapper.createProperty("intMap", OType.EMBEDDEDMAP, OType.INTEGER);
mapper.createIndex("mapIndexTestKey", OClass.INDEX_TYPE.NOTUNIQUE, "intMap");
mapper.createIndex("mapIndexTestValue", OClass.INDEX_TYPE.NOTUNIQUE, "intMap by value");
final OClass movie = database.getMetadata().getSchema().createClass("MapIndexTestMovie");
movie.createProperty("title", OType.STRING);
movie.createProperty("thumbs", OType.EMBEDDEDMAP, OType.INTEGER);