【发布时间】:2015-03-11 01:50:42
【问题描述】:
我有一组代表文件系统位置之间链接的节点。我可以加载所有节点,并尝试通过在每个节点中查找目标目录和源目录之间的匹配项来将它们链接在一起。
伪代码查询:
For all Interface nodes in Neo4j,
search all other nodes for where other.sourcedir = this.destdir.
If a match is found, create a SENDS_TO relationship from A to B.
天真的查询: MATCH (a:Interface), (b:Interface) WHERE a.destdir == b.sourcedir MERGE (a)-[r:SENDS_TO]->(b)
当我运行该查询时,Neo4j 似乎进入了一个无限循环,我在 10 分钟后终止了该循环。
【问题讨论】: