イメージ
コード(GREMLIN)
schema.vertexLabel("User").
ifNotExists().
partitionBy("uid", Text).
property("name", Text).
create();
schema.vertexLabel("Tweet").
ifNotExists().
partitionBy("text", Text).
create();
schema.edgeLabel('post').
ifNotExists().
from('User').to('Tweet').
create()
taro = g.addV("User").
property("uid", "user1").
property("name", "Taro").
next();
tweet1 = g.addV("Tweet").
property("text", "Hello world.").
next();
g.addE("post").
from(taro).
to(tweet1).
next();
tweet2 = g.addV("Tweet").
property("text", "test message.").
next();
g.addE("post").
from(taro).
to(tweet2).
next();
g.V()