How does the neo4j browser draw the object relationships?

跟風遠走 提交于 2019-12-20 04:58:09

问题


When I run a query such as match (n) return n all of the nodes are returned, however, the relationships and how the nodes are connected does not appear to be in the response data. However, the graph manages to draw the full data model with relationships.

What is the browser doing to gather together this information, or am I missing how this can be obtained from the response data?

I have been using neomodel to query the data, however the inflate method walks the structure and returns too slowly. I would like to achieve a similar response without the need to walk the entire structure and was wondering what the recommended approach was?


回答1:


[EDITED]

The neo4j browser has an "autoComplete" setting (labelled "Connect result nodes" in the latest version) that enables/disables querying for the relationships between the nodes in every result set. (Click on the gear icon in the leftmost panel of the browser to see the settings.)

In other words, the neo4j browser has to perform extra queries to get those relationships -- they are not returned for free when a query just asks for nodes.

If you are curious how autoComplete is implemented, here is a link to some of the actual code.



来源:https://stackoverflow.com/questions/52447520/how-does-the-neo4j-browser-draw-the-object-relationships

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