File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 44*/
55MATCH (tag :Tag { name : $tag } )<- [ : HAS_TAG ] - (message2 :Message )- [ : HAS_CREATOR ] -> (person1 )
66OPTIONAL MATCH (message2 )<- [ : LIKES ] - (person2 :Person )
7- OPTIONAL MATCH (person2 )<- [ : HAS_CREATOR ] - (message3 :Message )<- [ like : LIKES ] - (p3 :Person )
7+ OPTIONAL MATCH (person2 )<- [ : HAS_CREATOR ] - (message3 :Message )<- [ like : LIKES ] - (person3 :Person )
88RETURN
99 person1 .id ,
10- count (DISTINCT like ) AS authorityScore // 'DISTINCT like' ensures that each p2's popularity score is only added once for each p1
10+ // Using 'DISTINCT like' here ensures that each person2's popularity score is only added once for each person1
11+ count (DISTINCT like ) AS authorityScore
1112ORDER BY
1213 authorityScore DESC ,
1314 person1 .id ASC
1415LIMIT 100
16+
17+ // We need to use a redundant computation due to the lack of composable graph queries in the currently supported Cypher version.
18+ // This might change in the future with new Cypher versions and GQL.
You can’t perform that action at this time.
0 commit comments