Node count in projection differs from the number of queried nodes

The graph is POLE demo for neo4j 5.x

< gds projection >
call gds.graph.project(
'proj',
['Person'],
'KNOWS'
)
returned
"graphName": "proj",
"nodeCount": 369,
"relationshipCount": 586,
< same graph query >
match path = (p:Person)-[:KNOWS]-(p2:Person)
return path
Person (346)
Relationships (586)
Is this no problem? Customer might think GDS is not consistent.

Hey @Dongho ,
Your cypher query is only returning person nodes with at least one KNOWS relationships.
If you only run MATCH (p:Person) RETURN count(p) you should also see 369 nodes.

For the same result, you might want to look into the optional match statement (docs)

1 Like

Ah, I thought the labels and relationships are connected only in Native projection.
Thank you for the quick help!