Parameterized edges creation in existing graph
Hi :gremlin_smile: , I'm currently experimenting with Janusgraph. My graph is a directed hierachical graph coming straight from parsing an XML file. After this first bulk load, I want to add multiple new edges between vertices to create shortcuts or remove property duplication.
This was easily done using Cypher and a double MATCH but struggle to do the same thing in Gremlin.
I created a small dataset in Gremlify https://gremlify.com/jf036ue70jj/4
I tried project(), local(), combinations of select() and map() but I think I'm missing something really basic.
Thanks :furnace:
This was easily done using Cypher and a double MATCH but struggle to do the same thing in Gremlin.
I created a small dataset in Gremlify https://gremlify.com/jf036ue70jj/4
I tried project(), local(), combinations of select() and map() but I think I'm missing something really basic.
Thanks :furnace:
Solution
You've stumbled upon a common gap in Gremlin...
has() steps cannot currently take a traversal as an argument. It's listed as a roadmap item for a future TinkerPop 4.x release: https://github.com/apache/tinkerpop/blob/087b3070914123055d3e4ededc2550f12715a0b4/docs/src/dev/future/index.asciidoc#has-traversalGitHub
Apache TinkerPop - a graph computing framework. Contribute to apache/tinkerpop development by creating an account on GitHub.
