Extracting subgraph from neo4j database

蓝咒 提交于 2019-12-08 08:26:27

问题


I have a graph in neo4j database. I want to extract a sub graph given a particular node and a particular depth.
I tried using the traversal framework, but it only returns a set of paths. It gives path up to a particular depth. How can i construct a sub graph based on the set of paths that i get? Is there any other way to get the required result?


回答1:


In case that, by subgraph, you mean a list of nodes, and you've got the Path objects from the traversal already, you could just collect the end nodes of each path in a list.



来源:https://stackoverflow.com/questions/15587173/extracting-subgraph-from-neo4j-database

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