现在假设有2个节点(A,B)。
我可以在这两个节点之间创建多个关系吗?
例如, 关系(A,"附近",B) 关系(A," cooccurence",B) 关系(A,"实验",B)
答案 0 :(得分:1)
您可以通过直接使用函数py2neo库或运行cypher查询来创建多个关系。检查以下Cypher查询:
from py2neo import Graph
graph = Graph()
graph.cypher.execute("""merge (A:node_a {property:{state if there is a property}})
merge (B:node_b {property:{state if there is a property}})
merge (A)-[:neighborhood]->(B)
merge (A)-[:cooccurence]->(B)
merge (A)-[:experimental]->(B)""")