I am getting the same output. I cant really post a screenshot but essentially I am matching one node for x and three nodes for y (let's call them y1, y2, y3). With these nodes, I would like to get the edges (x-y1), (x-y2), and (x-y3), but none of the (y1-y2), (y1-y3) and (y2-y3). Is that possible?
Also what is the difference between:
MATCH p=(x:A {custom_id:0})-[r]-(y:B)
WHERE (y)-[:SUBTYPE]->(z:B {name:"Zed"})
RETURN p
and
MATCH (x:A {custom_id:0})-[r]-(y:B)-[:SUBTYPE]->(z:B {name: "Zed"}) RETURN x,r,y
There isn't one but rather multiple different types of relationships we capture in the graph between nodes of type A and type B, all equally interesting in this case. The directionality is important for the for the SUBTYPE relationship between the nodes of type B
I am having the same issues, I think, though in an even simpler form.
I have a relation named :OWNS and lets call the other relation :CUSTOMER and a relation named :PARTNER
And I have nodes with types (Individual:Party) and (:Organization:Party)
And I try to return the parties that own an item.
MATCH (p:Party)-[r:OWNS]->(i:Item) RETURN p, r, i
And my general understanding is that this then would return the graph with the matching elements. But I am getting other elements as well. I am getting all other nodes and relations from nodes that match the query. So if a party got an :OWNS relation then all other relations and the linked nodes that is linked to that party shows.
THough in the table mode it seems to only list the real data. Is there a configuration in neo to not print links from matched nodes unless asked for???
In the neo4j browser view, this may be the reason for seeing non-explicitly queried edges:
TLDR: The neo4j browser by default auto-completes to show all relationships that exist between nodes in the query/visualisation. This can be turned off in the settings tab (click on the gear bottom left) by unselecting "Connect result nodes".