Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
12-10-2019 11:42 AM
Basicaly, I want to match nodes that have some kind of relationship, but only when the nodes in this relationship do not have the same label.
I'll use that to match duplicate relationships on different node labels.
In the end I want to be able to get this kind of subgraph:
12-10-2019 11:50 AM
A node can have multiple labels. If you don't want any common label between the two ends of an edge, you can use something like this:
MATCH (a)-[r]->(b)
WHERE ALL(x IN labels(a) WHERE NOT x IN labels(b)) AND ALL(x IN labels(b) WHERE NOT x IN labels(a))
RETURN a, r, b
All the sessions of the conference are now available online