Reputation: 2234
I was learning neo4j, and following the tutorial provide atsearching for relationship.
I followed it, added two nodes and a relationship between them. I did exactly according to the tutorial in above link. But when i try to display the relationship i just added, by the following
MATCH (e)-[r:DO_SHOPPING_WITH ]->(cc)
RETURN r
it showed nothing.
to make sure, I displayed all nodes by
MATCH (a) return a
and it showed 2 nodes and the relationship between them.
Not only this case, I tried later examples, by similar search for relationship all are showed empty.
could anyone explain why I cannot display the relationship as it is told in the tutorial?
Pretty simple example, but somehow not working. Please help!
Upvotes: 0
Views: 255
Reputation: 30417
It sounds like you're just talking about the graph result view. When the only items returned from a query are relationships, they won't show up, as it requires the nodes on either side of a relationship to be returned in order to display.
While this is current behavior, past behavior was able to display the start and end nodes of a relationship even if just relationships were returned, and it's not a bad idea to consider reverting to this previous behavior.
I think this issue on the browser project is related.
Upvotes: 1