The Neo4j graph database contains about 50,000 nodes and> 50,000 relationships. There is a main graph that contains most nodes. But there are several charts that are not yet connected to the main chart.
To associate a different graph with one large main graph, I intend to use the Cypher query to list the paths or sets of related nodes ordered by size (the largest unrelated graph).
There are several posts in stackoverflow, for example:
Here is a small sample graph that poses a problem: A sample graph of the Neo4j console
The following Cypher request does not solve the problem, but is a starting point. It lists all those nodes that are not tied to the main chart. It skips the union of these nodes in the node collection. He works on a small chart. On a large chart, it returns "undefined" ... after starting more than 10 minutes.
START s=node(3), n=node(*) MATCH s-[*1..10]-m WITH collect(m) as members, n WHERE NOT n in members RETURN DISTINCT id(n), n.name? ORDER BY id(n) LIMIT 10;
How to use Cypher to list all disabled (sub) charts?
Environment: - Neo4j - Graph database engine 1.9.M05 kernel - Java - SE runtime (creation 1.7.0_17-b02)
Roman source share