Simple question about printing vertex labels
I am creating a graph in the gremlin cli by doing graph = TinkerGraph.open(), g = graph.traversal(), g.addV("somelabel"). i can confirm a vertex was created. i can do g.V().valueMap(true) and it shows ==>[id:0,label:documents]. But I so far do not know how to print information about a vertex via its index. I have tried g.V(0) but it doesnt print anything.
Solution:Jump to solution
By default, IDs are stored as longs. You likely need to use
g.V(0L)
in Gremlin Console to return the vertex that you created.2 Replies
Solution
By default, IDs are stored as longs. You likely need to use
g.V(0L)
in Gremlin Console to return the vertex that you created.Aha. I see. 👍