Reputation: 21
I am trying to come up with a gremlin query to find who is an employee and knows "Jack". I am interested as well on the path together with the edges to understand why they know each other
Here is the query I come up with but no luck with getting the edges.
g.V().has('isSSEmployee',true).repeat(both().simplePath()).until(has('name','Jack')).path().limit(10)
Upvotes: 1
Views: 879
Reputation: 14371
In order to have edges returned in the path result you need to specifically reference them in the query. Something like this:
g.V().has('isSSEmployee',true).repeat(bothE().otherV().simplePath()).until(has('name','Jack')).path().limit(10)
Hope that helps. Kelvin
Upvotes: 0