You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I need return all my friends of friends and (short road) I created schema where I have relationships :
I have 10 users and relationships :
Mirek known - > Sylwia
Mirek known -> Marcin known - > Seba
Mirek known -> Jarek
Mirek known -> Edek known -> Kaszczuk known -> Ana known -> unknown
Mirek known -> Damian known Edek known -> Kaszczuk known -> Ana known -> unknown
And I need all friends of friends Mirek #28:2184
so that is :
Seba #28:2191
Kaszczuk #28:2189
When I use that functions
select shortestPath(#28:2184,#28:2189).asString()
is OK [v(User)[#28:2184], v(User)[#28:2185], v(User)[#28:2189]]
But when I use that :
select $path, $depth from (traverse in,out,in_Friend,out_Friend from #28:2184 while $depth <= 4) where @Class='User'
To seba is ok : #28:2184.out_Friend[idx:1].#26:1229.in.#28:2183.out_Friend[idx:1].#26:1246.in.#28:2191
but to kaszczuk go around : #28:2184.out_Friend[idx:0].#26:1227.in.#28:2182.out_Friend[idx:1].#26:1235.in.#28:2185.out_Friend[idx:2].#26:1240.in.#28:2189
The text was updated successfully, but these errors were encountered:
Hello, I'm sorry you had to wait so long,
I have graph relationship all edges here are friend bidirectional.
I need something like traverse + shortestPath
I need friends of friends. Level 2 friendship.
We start in Mirek
SHOULD BE :
First level friends are :
Damian , Edyta , Jarek, Marcin , Sylwia
Second level friends are :
Kasczuk , Seba
Third level friends are :
Ana
Fourth level friends are :
Abdul
When I execute query : select $path, $depth from (traverse both('Friend') from #28:1342 while $depth <= 4)
but we have different :
Edyta should be to first level but she is in second level.
Kaszczuk should be to second level but she is on third level.
Hello,
I need return all my friends of friends and (short road) I created schema where I have relationships :
I have 10 users and relationships :
Mirek known - > Sylwia
Mirek known -> Marcin known - > Seba
Mirek known -> Jarek
Mirek known -> Edek known -> Kaszczuk known -> Ana known -> unknown
Mirek known -> Damian known Edek known -> Kaszczuk known -> Ana known -> unknown
And I need all friends of friends Mirek #28:2184
so that is :
Seba #28:2191
Kaszczuk #28:2189
When I use that functions
select shortestPath(#28:2184,#28:2189).asString()
is OK [v(User)[#28:2184], v(User)[#28:2185], v(User)[#28:2189]]
But when I use that :
select $path, $depth from (traverse in,out,in_Friend,out_Friend from #28:2184 while $depth <= 4) where @Class='User'
To seba is ok : #28:2184.out_Friend[idx:1].#26:1229.in.#28:2183.out_Friend[idx:1].#26:1246.in.#28:2191
but to kaszczuk go around : #28:2184.out_Friend[idx:0].#26:1227.in.#28:2182.out_Friend[idx:1].#26:1235.in.#28:2185.out_Friend[idx:2].#26:1240.in.#28:2189
The text was updated successfully, but these errors were encountered: