Created
December 5, 2014 23:42
-
-
Save ikwattro/dcc6bed30cd59dd19e6a to your computer and use it in GitHub Desktop.
get subgraph cypher
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
match (n)-[r:KNOWS]-(m) WITH {node:n,neighbours:collect({type:type(r),node1:m})} as neighbours | |
UNWIND {neighbours} AS rels | |
create (node)-[:rels.type]->(node1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment