Re: hey guys ,how to query a person relational depth
李平 <lipin...@...>
gremlin> g.addV().property('name', 'A').as('a').
addV().property('phone', '110').as('b').
addV().property('name', 'C').as('c').
addV().property('phone', '111').as('d').
addV().property('name', 'E').as('e').
addV().property('phone', '112').as('f').
addV().property('name', 'G').as('g').
addE('hasPhone').from('a').to('b').
addE('hasPhone').from('c').to('d').
addE('hasPhone').from('c').to('b').
addE('hasPhone').from('e').to('d'). addE('hasPhone').from('e').to('f').
addE('hasPhone').from('g').to('b').iterate() if I want to know vertex A's relation depth how to write the gremlin commond, I write like this g.V().has('userId','1').repeat(__.as("a").out().in().where(neq("a"))).emit().path().count(local).max() but it seem endless loop, 在 2017年8月23日星期三 UTC+8下午9:16:21,Jason Plurad写道:
|
|