问题
How to export including relationships? I've found that executing the default query
MATCH (n) RETURN n
Does return what I need graphically including the relationships between nodes (AUTO-COMPLETE switched on). I see my nodes and their relationship.
But when I save it either CVS or JSON it does not includes the relationships. Any idea how can I do it?
回答1:
This is how you'd get all the nodes and their outgoing relationships, if any.
MATCH (n)
OPTIONAL MATCH (n)-[r]->()
RETURN n, r;
Each relationship will tell you what its start and end nodes are, so you can get the end node's ID from it.
If you want to get the end node returned as well:
MATCH (n)
OPTIONAL MATCH (n)-[r]->(m)
RETURN n, r, m;
来源:https://stackoverflow.com/questions/36013948/neo4j-browser-export-file-including-relationships