I'm having a problem using Neo4j at the moment where I want to match two ore more nodes, that are not connected by any path.
Let's say we have a graph with two context components (is this the right word?), for example 4 nodes (A)-->(B)
and (C)-->(D)
.
When I run MATCH (A), (C)
in this situation, i get "No Rows" as result, probably because the algorithm can't reach (C)
after having chosen (A)
as starting node.
How can I still match those nodes?
MATCH (A), (C)
should return a Cartesian product between all node pairs... can you create a MVCe in the Neo4j console and share it? – TezraMATCH (A), (C) RETURN *
, and it returns no rows, then the only reasonable explanation is that your DB has no nodes. In that is true, then evenMATCH (A) RETURN *
should return no nodes. – cybersam(a:A)-[:HAS]->(b:B), (c:C)-[:HAS]->(d:D)
and then queryingmatch (a:A),(c:C) return a,c
. However it worked. Yesterday I used Neo4j 3.1.0, today I'm using 3.2.2. I'll check it when I get back to my Neo4j 3.1.0 – Urr4