Neo4j GDS Projections: Understanding Relationship Semantics

ملخص

This Neo4j community discussion explores the nuances of GDS graph projections, specifically focusing on how relationship filtering impacts projected data. The conversation provides a technical analysis of using WCC algorithms alongside APOC combinations to extract and validate relationship patterns. It is a valuable resource for developers looking to optimize complex graph queries and understand the underlying semantics of GDS projections.

fairknight-43 OP

I have this

MATCH (source:ResolvedEntity)-[r:RESOLUTION]->(target:ResolvedEntity) WHERE r.confidence = "POSSIBLY_SAME"
WITH gds.graph.project('super_resolved_orgs', source, target) AS g
return g

I then want to get all the components in this projection, but I'm worried that since r is not actually used in the project function, other relationships might end up in the projection. Can someone help me understand the semantics?

fairknight-43 OP

also I'm just going to paste this here because it's probably the most esoteric cypher I've ever written

CALL gds.wcc.stream('super_resolved_orgs')
YIELD nodeId, componentId
with componentId, collect(gds.util.asNode(nodeId)) AS members
limit 100
with members
unwind apoc.coll.combinations(members, 2) as combo
with combo[0] as a, combo[1] as b
match (a)-[r]-(b)
return distinct r.MATCH_LEVEL_CODE
goldenquartz-17

any thoughts on this?

الأحدث من Neo4j