commit: 6e0b3ddb0d14aaf7ea86efad8053966208c73b2c
parent: df2c0b8dad40c8f8bcf7a201a0f2827e97bf506b
Author: Eugen Rochko <eugen@zeonfederated.com>
Date: Sat, 15 Oct 2016 17:19:18 +0200
Fix follow suggestions order
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/app/models/follow_suggestion.rb b/app/models/follow_suggestion.rb
@@ -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