0

I have run into some errors with my gremlin console.

I have the following lines of code:

graph = TinkerGraph.open()
graph.io(graphml()).readGraph('air-routes.graphml')

i then do the following:

g.V(2) 

And this gives no output. in fact whenever i put in a number into V() nothing pops out when it should. What is going on?

Maths12
  • 852
  • 3
  • 17
  • 31

1 Answers1

1

You should set the id manager to use LONG identifiers:

conf = new BaseConfiguration()
conf.setProperty("gremlin.tinkergraph.vertexIdManager", "LONG")
conf.setProperty("gremlin.tinkergraph.edgeIdManager", "LONG")
conf.setProperty("gremlin.tinkergraph.vertexPropertyIdManager", "LONG")
graph = TinkerGraph.open(conf)
graph.io(graphml()).readGraph("air-routes.graphml")

See Loading the air-routes graph using the Gremlin console.

Jason Plurad
  • 6,682
  • 2
  • 18
  • 37