简体   繁体   English

为什么我的gremlin查询没有给出输出?

[英]Why doesn't my gremlin query give an output?

I have run into some errors with my gremlin console. 我的gremlin控制台出现了一些错误。

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. 实际上,每当我在V()中输入数字时,什么时候都不会弹出。 What is going on? 到底是怎么回事?

You should set the id manager to use LONG identifiers: 您应该将ID Manager设置为使用LONG标识符:

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 . 请参阅使用Gremlin控制台加载航线图

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM