Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
12-15-2020 11:27 AM
Hello
I have read through the following post, but do not quite understand the response i get in the example ..
also from the article above
when i do
(a)-[[:KNOWS*1..3]]->(b)
WHERE a.name = 'Anders'
return a.name, b.name
I get as result
what I need (would like to have) is
any simple solution for that?
Thanks rob
12-15-2020 02:35 PM
The query means "Who does Anders know directly or indirectly (with up to 3 jumps)"
The query you might be wanting is "who knows who directly).
That would be:
(a)-[[:KNOWS]]->(b)
return a.name, b.name // this will have duplicates though, which could be removed with sorting and distinct.
Or maybe you mean "who know who within 3 hops of Anders"
Then I think it would be something like except it wouldn't include people directly associated with Anders. (I can't quite figure out a neat short query for that....)
(a)-[[:KNOWS*1..3]]->(someone_in_anders_circle)
WHERE a.name = 'Anders'
MATCH (someone_in_anders_circle)-[:KNOWS]->(b)
All the sessions of the conference are now available online