What should I do to setup a new Gremlin version for Neo4j?

[亡魂溺海] 提交于 2019-12-11 11:54:34

问题


I am using Neo4j - Graph Database Kernel 1.8

It uses this gremlin version:

gremlin> Gremlin.version()
==> 1.5

which is very old version.

I want to upgrade to gremlin 2.0 or 2.1 from the github project, since I can't run this command on gremlin 1.5:

gremlin> g.v(1).outE.has("weight", T.gte, 0.5f).weight
==> No such property: T for class: groovysh_evaluate

My question is what should I do, so I won't mess up all the entire environment of neo4j.


回答1:


You can run:

import com.tinkerpop.gremlin.Tokens.T

To call the gremlin helper Tokens ("T") directly:

g.v(1).outE.has("weight", T.gte, 0.5f).weight

Or you can write:

g.v(0).outE.has("weight", Tokens.T.gte, 0.5f).weight

Write it in the gremlin shell.




回答2:


the Gremlin plugin and the server will be upgraded in the next weeks, is that ok?



来源:https://stackoverflow.com/questions/13308967/what-should-i-do-to-setup-a-new-gremlin-version-for-neo4j

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!