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
| = Untying the Graph Database Import Knot = | |
| This Graphgist accompanies http://blog.bruggen.com/2013/12/untying-graph-database-import-knot.html[my blogpost of December 6th, 2013] which tries to explain the different types of questions that people should be asking themselves when thinking about importing data into http://www.neo4j.org[neo4j], and the tools that can contribute to finding the most optimal import strategy for your specific use case. | |
| //setup | |
| //hide | |
| [source,cypher] | |
| ---- | |
| create (n1:Tool {id:'1',name:'Spreadsheets'}), | |
| (n2:Tool {id:'2',name:'Cypher Statements'}), |
Answering a Stackoverflow question
My graph is a tree structure with root and end nodes, and a line of nodes between them with -[:NEXT]-> relationships from one to the next. Some nodes along that path also have -[:BRANCH]-> relationships to other root nodes, and through them to other lines of nodes.
What Cypher query will return an ordered list of the nodes on the path from beginning to end, with any BRANCH relationships being included with the records for the nodes that have them?
Table of Contents
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
| package tests; | |
| /** | |
| * | |
| * @author kb | |
| * | |
| */ | |
| import org.neo4j.cypher.ExecutionEngine; | |
| import org.neo4j.cypher.ExecutionResult; |

