Hi everyone,
I was trying to do the coalesce trick, to add vertices only if they do not exist so far and then reusing them later on.
My minimal working example can be found on the bottom.
If I run this I get the error: java.lang.IllegalArgumentException: The provided traverser does not map to a value: v[4312]->[SelectOneStep(last,v1)].
Since it works fine with only a single vertex e.g. v1 and then adding a loop edge,
this suggests to me, that on "restarting" with another use of a graph traversal source V(), the previously stored values, i.e. v1 in this case, get lost.
Am I missing something here?
Thanks for any suggestions!!
g.V().has("prefix", "ACT").fold().
coalesce(__.unfold(),
__.addV("prefix_node").property("prefix","ACT") ).as("v1").
V().has("prefix", "CTG").fold().
coalesce(__.unfold(),
__.addV("prefix_node").property("prefix","CTG")).as("v2").
addE("suffix_edge").from("v1").to("v2").iterate();