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

时间:2018-12-13 09:32:38

标签: graph gremlin tinkerpop tinkerpop3

我的gremlin控制台出现了一些错误。

我有以下几行代码:

cpubench

我然后执行以下操作:

biglist :=[list1,list2,list3];
Terms :=[Expr1,Expr2,Expr3]


conditions := seq([apply(`and`, op(bigList[i]))], i = 1 .. nops(bigList)); 
sequence := seq([conditions[i][1], Terms[i]], i = 1 .. nops([conditions])); 

pieceWiseResult := piecewise(seq(op(sequence[i]), i = 1 .. nops([sequence])));

这没有输出。实际上,每当我在V()中输入数字时,什么时候都不会弹出。到底是怎么回事?

1 个答案:

答案 0 :(得分:1)

您应将ID管理器设置为使用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")

请参见Loading the air-routes graph using the Gremlin console

相关问题