Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
04-28-2020 03:03 PM
Hi! I am rewriting some of my queries using graph algos to run only on some components. While I run the original query on node-label and relationship-type projection: example
CALL algo.beta.louvain('alias', 'through_citations', {graph: 'huge',
weightProperty: 'weight', direction : 'OUTGOING', seedProperty: 'GraphProperty_louvain_throughCitations', writeProperty: 'GraphProperty_louvain_throughCitations'
})YIELD loadMillis, computeMillis, writeMillis;
running for some specific components run on cypher:
CALL apoc.periodic.iterate("
MATCH (a:alias)
WHERE a.found_person_via_bulk_update = FALSE
RETURN a.GraphProperty_wcc_throughCitations AS component",
"
WITH DISTINCT component AS component
CALL algo.beta.louvain(
'MATCH (n:alias {GraphProperty_wcc_throughCitations : $component}) RETURN id(n) AS id',
'MATCH (n)-[r:through_citations]-(m:alias) RETURN id(n) AS source, id(m) AS target, r.weight as weight',
{graph:'cypher',
params: {component: component},
weightProperty: 'weight',
direction : 'OUTGOING',
seedProperty: 'GraphProperty_louvain_throughCitations',
writeProperty: 'GraphProperty_louvain_throughCitations'})
YIELD nodes, loadMillis, computeMillis, writeMillis
RETURN nodes,loadMillis, computeMillis, writeMillis", {batchSize:5000, iterateList:true});
Will this later code experience slow downs because it is on cypher projections. If so, for how large components? Thanks
04-29-2020 02:48 PM
I think I found a solution to avoid cypher projections while subsetting a graph and running graph algos:
@alicia.frame @andrew.bowman could you comment on this approach? Also, if this strategy is already implemented within graph algos library - I do not want to re-invent the wheel. Thanks.
All the sessions of the conference are now available online