I have a Object with following/follow relationship (see extract below). 
 I'd like to retrieve the Count(*) for each of these 
relationship(incoming/outgoing) using Cypher Query.  I tried the following 
but getting error near the word (DIRECTION).

START user=node({0}) MATCH user-[:FOLLOWS]-() WHERE DIRECTION=INCOMING 
RETURN COUNT(*) AS count

This line seems retrieve the count for both incoming and outgoing 
relationship, which not what I'm after

@Query("START user=node({0}) MATCH user-[:FOLLOWS]-() RETURN COUNT(*) AS 
count")

Class

@Node
public class User{
...
@RelatedTo(type="FOLLOWS", direction=Direction.OUTGOING) 
@Fetch
private Set<User> following;
@RelatedTo(type="FOLLOWS", direction=Direction.INCOMING) 
@Fetch 
private Set<User> followers;
...
}

-- 
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 neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to