APOC Virtual Relationships and GDS

61 Views Asked by At

I want to create virtual relationships in Neo4j using APOC and run GDS algorithms like degree distributions. Is it even possible?

1

There are 1 best solutions below

0
cybersam On BEST ANSWER

No, virtual nodes and relationships cannot be projected in GDS.

For example, if you try this query:

CALL apoc.create.vNode(['Foo'], {name: 'xyz'}) YIELD node
RETURN gds.graph.project('t', node) AS g

You get an error like this (virtual entities have negative native IDs):

Failed to invoke function gds.graph.project: Caused by: java.lang.IllegalArgumentException: GDS expects node ids to be positive. But got a negative id of -2.