From: Eugen Rochko Date: Sat, 15 Oct 2016 15:19:18 +0000 (+0200) Subject: Fix follow suggestions order X-Git-Url: https://git.xn--scling-oua.cat.family/?a=commitdiff_plain;h=6e0b3ddb0d14aaf7ea86efad8053966208c73b2c;p=mastodon.git Fix follow suggestions order --- diff --git a/app/models/follow_suggestion.rb b/app/models/follow_suggestion.rb index e92546134..df1d77e6c 100644 --- 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