Neo4j 算法可以';找不到relationshipWeightProperty

Neo4j 算法可以';找不到relationshipWeightProperty,neo4j,cypher,Neo4j,Cypher,我尝试执行Louvain模块化算法: CALL gds.louvain.stream({ nodeProjection: 'Tag', relationshipProjection: 'CONNECTED_TO', relationshipWeightProperty: 'count_all_mentor' }) YIELD nodeId, communityId WITH gds.util.asNode(nodeId).name AS tag, communityId RETURN

我尝试执行Louvain模块化算法:

CALL gds.louvain.stream({
  nodeProjection: 'Tag',
  relationshipProjection: 'CONNECTED_TO',
  relationshipWeightProperty: 'count_all_mentor'
}) YIELD nodeId, communityId
WITH gds.util.asNode(nodeId).name AS tag, communityId
RETURN collect(tag), communityId
但我得到了以下错误:

Failed to invoke procedure `gds.louvain.stream`: 
Caused by: java.lang.IllegalArgumentException: Relationship weight property `count_all_mentor`
not found in graph with relationship properties: [] in all relationship types: ['CONNECTED_TO']
我的“连接到”关系具有以下属性:

MATCH (:Tag)-[c:CONNECTED_TO]-(:Tag)
WHERE NOT exists(c.count_all_mentor)
RETURN count(c.count_all_mentor)
上述查询的结果为“0”


我的问题:如何使用projection and relationshipWeithProperty调用gds.louvain?

即使您的DB没有连接到该属性的
关系,您最后的查询也会返回
0
。此查询将返回所有这些关系是否都具有该属性:
MATCH(:Tag)-[r:CONNECTED\u TO1]->(:Tag),其中COLLECT(r)作为rs返回大小(rs)>0和all(rs中的c,其中c.count\u all\u mentor不为NULL)