Is there any efficient way to find all connected subgraphs in NebulaGraph

113 Views Asked by At

I have several isolated subgraphs in a graph space like: [1-2, 2-3], [4-5,5-6], [7-8]. I want to get subsets of nodes of all connected subgraphs such as:

[1,2,3], [4,5,6], [7,8] # 3 subgraphs Can I get these results in an efficient way by the nGQL in Nebula Graph?

1

There are 1 best solutions below

1
On

This is typically a Graph Computation job rather than a graph database query.

In theory, we could do this with LOOKUP xxx | GET SUBGRAPH (or of course with a complex multiple MATCH OpenCypher query) while, it in most cases(unless we are in an extremely small dataset, or, the graph is quite isolated).

Instead, if we are talking about all isolated subgraphs, we should go for NebulaGraph Algorithm, which is Open Source, too.