I am new to neo4j, and am just following the example from the docs:
neo4j@neo4j> CREATE (john:Person {name: 'John'})
CREATE (joe:Person {name: 'Joe'})
CREATE (steve:Person {name: 'Steve'})
CREATE (sara:Person {name: 'Sara'})
CREATE (maria:Person {name: 'Maria'});
0 rows available after 55 ms, consumed after another 0 ms
Added 5 nodes, Set 5 properties, Added 5 labels
neo4j@neo4j> MATCH (n) RETURN n;
+---------------------------+
| n |
+---------------------------+
| (:Person {name: "John"}) |
| (:Person {name: "Joe"}) |
| (:Person {name: "Steve"}) |
| (:Person {name: "Sara"}) |
| (:Person {name: "Maria"}) |
+---------------------------+
5 rows available after 16 ms, consumed after another 5 ms
Note that there are no node names here. So when I try to create relationships, it can't find the nodes and creates new (blank) nodes:
neo4j@neo4j> CREATE (john)-[:FRIEND]->(joe)-[:FRIEND]->(steve)
CREATE (john)-[:FRIEND]->(sara)-[:FRIEND]->(maria);
0 rows available after 39 ms, consumed after another 0 ms
Added 5 nodes, Created 4 relationships
neo4j@neo4j> MATCH (n) RETURN n;
+---------------------------+
| n |
+---------------------------+
| (:Person {name: "John"}) |
| (:Person {name: "Joe"}) |
| (:Person {name: "Steve"}) |
| (:Person {name: "Sara"}) |
| (:Person {name: "Maria"}) |
| () |
| () |
| () |
| () |
| () |
+---------------------------+
10 rows available after 2 ms, consumed after another 1 ms
I can see in the web browser that the blank nodes are all connected, and the named nodes are unconnected.
neo4j@neo4j> call dbms.components() yield name, versions, edition unwind versions as version return name, version,
edition;
+----------------------------------------+
| name | version | edition |
+----------------------------------------+
| "Neo4j Kernel" | "4.2.1" | "community" |
+----------------------------------------+
Any help would be greatly appreciated.