cypher - How to list out all the nodes which are having common properties in neo4j -
i'm having 4 nodes a,b,c,d having next properties,
a:{works_in:"wipro"},{designation:"se"} b:{works_in:"cts"},{designation:"sse"} c:{works_in:"cgi"},{designation:"se"} d:{works_in:"uhg"},{designation:"sse"}
now want display nodes having similar properties either works_in/designation
you can seek like:
match (a:yourlabel) match (b:yourlabel) <> b , (b.works_in = a.work_in or b.designation = a.designation) homecoming a, collect(b) similar
this match nodes , utilize each node source new query. a <> b
stop nodes matching themselves.
neo4j cypher graph-databases
No comments:
Post a Comment