I am trying to run a simple cypher query with neo4j 3.0.3 through the shell. My query is as follows:
MATCH p=(me)<-[:contains*1..10000]-(end) RETURN p;
When I try to run this query I get the following error:
WARNING: Invalid input '=': expected an identifier character, node labels, a property map, a relationship pattern, ',', USING, WHERE, LOAD CSV, START, MATCH, UNWIND, MERGE, CREATE, SET, DELETE, REMOVE, FOREACH, WITH, CALL, RETURN, UNION, ';' or end of input (line 1, column 8 (offset: 7)) "MATCH p=(me)<-[:contains*1..10000]-(end) RETURN p" ^
When I run the same query by telling the shell to please use version 2.3 of cypher everything is fine:
CYPHER 2.3 MATCH p=(me)<-[:contains*1..10000]-(end) WHERE id(me)=51 AND ALL(x in nodes(p) WHERE x.rtype <> 'unknown') AND NOT (end)<-[:contains]-(:res) AND end.rtype='project' RETURN p;
When I remove the assignment of the path to variable p as for example in the following query:o
MATCH (me)<-[:contains*1..10000]-(end) RETURN me;
This query executes just fine.
I have read the cypher manual and find tons of examples that use match clauses assigning paths to variables just like in my code.
Any clues what I'm doing wrong?
CYPHER 2.3or did you type it again? Are you sure you did not manage to type a different character looking like "="? - Frank Pavageau