I need to retrieve a list of Objects sorted by the number of followers an
Account has.
If param maxCount is 3 then it should retrieve all accounts that have less than
3 followers.
I'm not sure why the following query is misbehaving. For example if Account1
has 3 followers and Account2 has 1 follower and param macCount equals 2.
I should get back only Account2 (1 follower) but I get both Accounts (1 and 2).
What I'm I missing?
Spring Data Neo4j Version : 3.3.0
@Query("MATCH (a:Account)<-[:follows]-(b:Account) WITH a, COLLECT(b) AS bs
WHERE SIZE(bs) <= {0} RETURN a ORDER BY SIZE(bs) DESC LIMIT {1}")
List<AccountGraph> findCappedSortedAccountByFollowers(int maxCount, int
resultSize);
--
You received this message because you are subscribed to the Google Groups
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.