Is there any way to visualise (the actual graph) only a particular type of relationship in Neo4j using Cypher? For eg, consider the data model wherein the nodes can have three types of relationships, namely QR,QL and RL.
(A) -[QR]-> (B)
(A) -[QL]-> (B)
(A) -[RL]-> (B)
Suppose that two nodes have all the three types of relationships between them and say I want to highlight only the QR relationships in the entire graph. Now if I run
"MATCH p=(n)-[r:QR]->(m) RETURN p LIMIT 10;"
it does give me the required result in tabular form. However, the visualisation part is not as required. It shows all the relationships between A and B (oi61.tinypic.com/219qmgm.jpg) but I want it to show only the QR relations between A and B. Can anyone please help me on this? Thanks in advance! :)
MATCH (n)-[r:QR]->(m) RETURN r LIMIT 10
? The expressionp = ...
assigns any path betweenn
andm
to the variablep
. That's not necessarily the single relation between them. – user1019830r
or any relation in the Neo4j browser, you get back both nodes involved, plus all the relations between them. Here, these multiple relations are on top of each other in the GUI, so you can only click the one the "top". The actual result is showed in the tabular data, which will be correct. The GUI isn't then "correct" about the actual data returned, since it shows slightly more data. – user1019830