【问题标题】:Neo4j algo.unionFind equivalent with new Graph Data Science LibraryNeo4j algo.unionFind 与新的图形数据科学库等效
【发布时间】:2021-04-24 05:44:27
【问题描述】:

我有一个在 Neo4j 中使用 algo.unionFind 的密码投影。但是,该算法已被弃用。我的查询是:

CALL algo.unionFind('MATCH (n) WHERE n.dtype=\"VALUE\" RETURN id(n) AS id','MATCH p=(n)-[]-(m) WHERE n.dtype=\"VALUE\" AND m.dtype=\"VALUE\" RETURN id(n) AS source, id(m) AS target', {write:true, partitionProperty:\"partition\", graph:'cypher'}) YIELD nodes, setCount, loadMillis, computeMillis, writeMillis

我希望找到一种与图形数据科学库等效的方法,该方法运行查询并在我的节点中写入新属性 partition

任何帮助将不胜感激!

【问题讨论】:

    标签: python neo4j cypher py2neo graph-data-science


    【解决方案1】:

    算法已在新 GDS 库中重命名为 gds.wcc.write

    【讨论】:

    • 谢谢!我想知道如何合并密码投影?在gds.wcc.write我只看到写属性的参数。
    • 可以使用nodeQuery和relationshipQuery参数
    • 谢谢!我使用了gds.graph.create.cypher 并传入了nodeQuery 和relationshipQuery 参数。然后gds.wcc.write 写入新属性
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2020-09-22
    • 1970-01-01
    • 2015-11-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多