I am trying to write a query to find all path between 2 given vertices
will give an example to help you understand my question, here’s graph like that, I’m using JanusGraph
Vertex_1(id=1, value='Bob')
Vertex_2(id=2, value='Tom')
Vertex_3(id=3, value='Tom')
Vertex_4(id=4, value='Jamie')
Edge_1(Vertex_1 -> Vertex_2)
Edge_2(Vertex_3 -> Vertex_4)
Can I find the path between Vertex_1 to Vertex_4 since Vertex_2 and Vertex_3 have same value, Can Vertex_2 and Vertex_3 be considered as a single node? Thanks
I have tried the following Gremlin query, but it doesn’t work:
g.V().has('value','Bob').repeat(timeLimit(10000).bothE().otherV()).limit(5000).simplePath()).emit().times(3).dedup().has('value','Jamie').limit(1).path().by(id)
New contributor
user17372935 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.