Browse Source

Fix follow suggestions order

closed-social-glitch-2
Eugen Rochko 7 years ago
parent
commit
6e0b3ddb0d
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      app/models/follow_suggestion.rb

+ 2
- 2
app/models/follow_suggestion.rb View File

@ -7,8 +7,8 @@ START a=node:account_index(Account={id})
MATCH (a)-[:follows]->(b)-[:follows]->(c)
WHERE a <> c
AND NOT (a)-[:follows]->(c)
RETURN DISTINCT c.account_id, c.nodeRank
ORDER BY c.nodeRank
RETURN DISTINCT c.account_id, count(b), c.nodeRank
ORDER BY count(b) DESC, c.nodeRank DESC
LIMIT {limit}
END

Loading…
Cancel
Save