【发布时间】:2016-12-05 09:50:21
【问题描述】:
我使用neo4j-mazerunner 来分析我图表上的 strongly_connected_components 关系。该过程已经结束,现在我在我的节点上获得了 strongly_connected_components 属性。
我使用以下查询来获取不同节点的节点行:
MATCH (n) WHERE has(n.strongly_connected_components)
RETURN DISTINCT "node" as element, n.strongly_connected_components
AS strongly_connected_components
LIMIT 25 UNION ALL MATCH ()-[r]-()
WHERE has(r.strongly_connected_components)
RETURN DISTINCT "relationship" AS element, r.strongly_connected_components
AS strongly_connected_components LIMIT 25
我不确定如何对图表进行密码查询以可视化生成的集群。
如有任何帮助,将不胜感激。
【问题讨论】:
-
您的查询中有一些问题,除了它没有按照您的要求进行。
RETURN DISTINCT "node" as element, ...将始终返回字符串“node”作为结果中element列的值——这可能不是您想要的。此外,UNION子句之后的子查询永远不会匹配任何内容,因为 mazerunner 只会将strongly_connected_components属性添加到节点。
标签: apache-spark neo4j cypher strongly-connected-graph neo4j-mazerunner