Hi,
There are some confusion about create an undirected graph in Neo4j. The Neo4j Graph Algorithm book suggests that the undirected relation can be created. I am currently working on an undirected social network in Neo4j. Nodes are represent a person and the link between them is undirected which means they both know each other (eg. A-B; A knows B and B knows A).
I was panning to generate a graph with links (without arrow pointed) like this:
However, from the small example I proposed, the output I got was this:
Following is the query I used to generate an undirected relation graph.
LOAD CSV WITH HEADERS FROM 'file:///RelationTest.csv'AS line
MATCH (source:Person {id:line.id1}),(target:Person{id:line.id2})
MERGE (source)-[:linksTo]-(target)
I am confused that the results of MERGE (source)-[:linksTo]-(target)
and MERGE (source)-[:linksTo]->(target)
are the same.
Why are the same results happened? So how can I generate a undirected graph?
I am new to Neo4j could anyone help me to clarify this confusion?