To get all the nodes connected to a super node in Neo4j

女生的网名这么多〃 提交于 2019-12-24 00:58:12

问题


I have started learning cypher query for using graphical database. How should i get the values of all the nodes related to a super node. I am trying out the following query in console but its not working:

start a=node(2) match (a)-[:TYPE*]<-(node) return node;

node(2) is the super node. and the relation by which all other nodes are connected to a super node is TYPE. How should i correct my query.?

Error : SyntaxException: expected -


回答1:


You're representing the relationship wrong, try

start a=node(2) match (a)<-[:TYPE*]-(node) return node;


来源:https://stackoverflow.com/questions/20425157/to-get-all-the-nodes-connected-to-a-super-node-in-neo4j

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!