问题
In the neo4j browser, when I click on * under 'Node Lables' returns nodes of all label types, and when I click on any node, I could see the label name appearing at the top. However, the following cypher query is not working.
MATCH (n:`Home`) RETURN n LIMIT 25
MATCH (n:Home) RETURN n LIMIT 25
I have turned on the CYPHER 2.0 property in the neo4j.properties. Do I need to change any other settings? I see these lablels when I export as JSON
回答1:
I noticed this problem when upgrading. Did not manage to find out the problem, but what I did was delete the database and recreate it entirely -> matching on labels worked again. Of course, deleting the entire database and recreating it is not possible in all situations
回答2:
Specify START Clause and it works, START n=node(*) where n:Home RETURN n LIMIT 25 . The START clause way worked irrespective of the cypher_parser_version=2.0 property in neo4j.properties commented/uncommented. But I still wonder why your query does not work..
来源:https://stackoverflow.com/questions/20358454/cypher-2-0-query-using-label-does-not-return-any-nodes