1 Answer
- Newest
- Most votes
- Most comments
1
A similar query in Gremlin would be:
g.V().hasLabel('Customer').
repeat(bothE('HAS_LOCATION', 'HAS_EMAIL', 'HAS_PHONE') .otherV().simplePath()).
emit().
times(25).
path().by(elementMap())
One thing to realize is that openCypher and Gremlin differ in how they build paths. By default, openCypher will only cross an edge once. With Gremlin and using simplePath()
, a vertex/node is only traversed once.
This could also be an expensive query to execute if there are many nodes with a label of Customer
. I would suggest that if using Neptune that you look to constrain the starting point for this query to one, or a subset, of starting nodes.
answered 6 months ago
Relevant content
- asked 2 years ago
- Accepted Answerasked 2 years ago
- asked 2 years ago
- AWS OFFICIALUpdated 10 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 9 months ago
Thankyou for response