cypher - Neo4J: Query nodes where any pair of nodes are connected by a certain number of different relations? -
How to create a Neo4J query:
1) Return all the nodes, where no pair of nodes Are connected to a certain number of different relationships? For example, 2, 3 or 5 different nodes associated with relationships? Therefore, instead of a query returning the nodes associated with unknown number relationships:
  MATCH (N) - [R] - & gt; (M) Returns N, R, M;    In the general case, the query for the sub-graph will appear where no pair of node n & gt; K, n = L or N & L; Relationships?   
 
  To find exactly 3 nodes associated with relationships:  
  match (N) - [R * 3] - & gt; (M) Returns N, R, M;    To find the nodes associated with many relationships in the category [2..5]:  
  Matt (N) - [R * 2. .5] - & gt; (M) Returns N, R, M;    To find the nodes associated with 5 relationships (avoids the lower bound matter of 1, where there is no relationship, i.e., similar to n meter):  < Pre>  Matt (N) - [R * 1] - & gt; (M) Returns N, R, M;    To find the nodes associated with at least 2 relationships:  
  Matt (N) - [R * 2 ..] - & gt; (M) returns n, r, m;    
 
Comments
Post a Comment