Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
11-30-2021 05:23 PM
What I tried like this:
I made News--RootWord graph and added news_group property on News nodes by GDS Louvain.
Project News--RootWord graph as 'news'.
Create subgraph:
call gds.beta.graph.create.subgraph(
'newsGroup740',
'news',
'n.news_group=740',
'*'
)
It created a subgraph of 285 nodes and 0 relations.
call gds.graph.export('news', {dbName:'news'})
and then browse the news group of 740(one of Louvain result group ids):
match (n:News)-[:FROM_NEWS]->(r:RootWord) where n.news_group=740
return n, r
It displayed thousands relationships of "FROM_NEWS" within the nodes of the news_group(740).
Would it be a bug or am I doing something wrong when I creat subgraph in memory?
Dongho.
Solved! Go to Solution.
12-01-2021 03:24 PM
I think that the issue is that you aren't exporting RootWord
in your subgraph projection, and there are no relationships between News
nodes.
You'll want to modify your subgraph projection:
CALL gds.beta.graph.create.subgraph(
'newsGroup740',
'news',
'n:RootWord OR (n:News AND n.news_group=740)',
'*'
)
YIELD graphName, fromGraphName, nodeCount, relationshipCount
That should load the news
and rootWord
nodes as well as the relationships between them.
12-01-2021 03:24 PM
I think that the issue is that you aren't exporting RootWord
in your subgraph projection, and there are no relationships between News
nodes.
You'll want to modify your subgraph projection:
CALL gds.beta.graph.create.subgraph(
'newsGroup740',
'news',
'n:RootWord OR (n:News AND n.news_group=740)',
'*'
)
YIELD graphName, fromGraphName, nodeCount, relationshipCount
That should load the news
and rootWord
nodes as well as the relationships between them.
12-02-2021 07:33 AM
Oh, definitely I missed that part. Alicia, thanks again.
Subgraph is really good tool, I think I will use it a lot.
Dongho.
All the sessions of the conference are now available online