The following query should return the account sorted by the number 
"followers" in desc order, with a limit.  


It takes 2 variables as params (maxCount and limit). MaxiCount refers to a 
numbers of followers. so if maxCount is 100, then return all accounts that 
have followers less than 100.  


The following query seems to be ignoring this constraint: If I have 
account1 with 3 followers and account2 with 1 follower. It incorrectly 
return both accounts when it should only return account2 which has only 1 
follower.


@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}")


It seems work within neo4j console. Perhaps this is Spring Data Bug?

-- 
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.

Reply via email to