[Neo4j] Cypher: combining results?

D. Frej dieter_frej at gmx.net
Sun Nov 6 10:55:31 CET 2011


Hi,

Cypher allows to define multiple starting points. Example:
start n=(1, 2, 3) return n (taken from 
http://docs.neo4j.org/chunked/stable/query-start.html#start-multiple-nodes-by-id)

Can this only be done in the START clause or also in the MATCH clause, 
like this?

START principal=node:nodes(NAME='User 3')
MATCH (principal)-[:IS_MEMBER_OF*0..1]->()<-[:IS_MEMBER_OF*0..]-(n), (n, 
principal)-[secRel:SECURITY]->(d)
RETURN d

When I do it as mentioned, I get the following Exception which does not 
make any sense to me:

Exception in thread "main" org.neo4j.cypher.SyntaxException: Matching 
nodes without identifiers have to have parenthesis: ()

What did I do wrong?

Thanks,

Didi


More information about the User mailing list