Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
01-29-2023 09:56 AM
I am stumped here -
Trying to do a simple match on Node labels.
I copied DIRECTLY from the cypher manual https://neo4j.com/docs/cypher-manual/current/clauses/match/#match-with-labels
the code
MATCH (n:Movie|Person)
RETURN n.name AS name, n.title AS title
but when I run it in the sandbox - I get this error
Invalid input '|': expected ")", "WHERE", "{" or a parameter (line 1, column 15 (offset: 14)) "MATCH (n:Movie|Person)"
Thoughts?
01-29-2023 10:57 AM
That is the new version 5 syntax that allows logical expressions for the label condition. The documentation version is selected in the dropdown menu in the upper lefthand side of the window.
Prior to that, you could construct logical expressions in the 'where' clause, such as:
MATCH (n)
WHERE n:Movie or n:Person
RETURN n.name AS name, n.title AS title
01-29-2023 12:47 PM
In. the course sandbox we still use V4 of Neo4j so as @glilienfield said, you need to select the V4 docs.
01-29-2023 12:52 PM
Thank you to glilienfield and elaine - I found the Cypher Manual v4.
So will the test be on version 4 syntax?
01-29-2023 12:55 PM
We have not updated the certification exam to test R5 syntax. We will do so after the courses are updated.
Elaine
All the sessions of the conference are now available online