Re: [Neo4j] Cypher: combining results?
On Nov 6, 2011 10:55 AM, D. Frej dieter_f...@gmx.net wrote: 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 The problem is the last part of the match, where you have (n,principal). What is it that you are trying to express with that? Andrés ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Cypher: combining results?
On Sun, Nov 6, 2011 at 12:25 PM, Andres Taylor andres.tay...@neotechnology.com wrote: On Nov 6, 2011 10:55 AM, D. Frej dieter_f...@gmx.net wrote: 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 The problem is the last part of the match, where you have (n,principal). What is it that you are trying to express with that? Well, to be truthful about it - the stupid exception is also a problem. It's been nagging me for some time, Cypher's syntax checking is not what I would like it to be. Sorry about that... Andrés ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Cypher: combining results?
I have a very simply graph: UserGroup 2 -[:IS_MEMBER_OF]- UserGroup 1, User 3 UserGroup 1 -[:IS_MEMBER_OF]- User 1, User 2 And I am trying to get all nodes that are on the same level and below the starting point including the starting point. This works for, e.g. User 3, but not for UserGroup2. The cypher is used is the one presented. Since I cannot get the starting point included, I tried to do this combining thing for the further matching. Am 06.11.2011 12:25, schrieb Andres Taylor: On Nov 6, 2011 10:55 AM, D. Frejdieter_f...@gmx.net wrote: 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 The problem is the last part of the match, where you have (n,principal). What is it that you are trying to express with that? Andrés ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Cypher: combining results?
Andrés, is there an official grammar for e.g. antlr or JavaCC for cypher syntax? Am 06.11.2011 15:11, schrieb Andres Taylor: On Sun, Nov 6, 2011 at 12:25 PM, Andres Taylor andres.tay...@neotechnology.com wrote: On Nov 6, 2011 10:55 AM, D. Frejdieter_f...@gmx.net wrote: 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 The problem is the last part of the match, where you have (n,principal). What is it that you are trying to express with that? Well, to be truthful about it - the stupid exception is also a problem. It's been nagging me for some time, Cypher's syntax checking is not what I would like it to be. Sorry about that... Andrés ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user