You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`apoc.virtual.graph([list-of-paths, nodes, rels], [properties to remove]) -> {nodes, rels}
to exclude embeddings and large text properties
we already have all the virutal graph methods but they actually just wrap existing nodes and rels
call db.index.fulltext.queryNodes("movieFulltext","Forrest Gump", {limit:1}) yield node as n, score as s1
call db.index.vector.queryNodes("moviePlotsEmbedding",5, n.plotEmbedding) yield node as movie, score
match path = (person:Person)-[rp]->(movie)-[rg:IN_GENRE]->(genre)
with collect(path) as paths
call apoc.graph.fromPaths(paths,"results",{}) yield graph
with graph.nodes as nodes, graph.relationships as rels
with rels, apoc.map.fromPairs([n in nodes | [coalesce(n.tmdbId, n.name), apoc.create.vNode(labels(n),n {.*, plotEmbedding:null, posterEmbedding:null, plot:null, bio:null })]]) as nodes
return nodes, [r in rels | apoc.create.vRelationship(nodes[coalesce(startNode(r).tmdbId,startNode(r).name)], type(r), properties(r), nodes[coalesce(endNode(r).tmdbId,endNode(r).name)])] as rels
I want to replace the whole thing by an aggregation function like this:
call db.index.fulltext.queryNodes("movieFulltext","Forrest Gump", {limit:1}) yield node as n, score as s1
call db.index.vector.queryNodes("moviePlotsEmbedding",5, n.plotEmbedding) yield node as movie, score
match path = (person:Person)-[rp]->(movie)-[rg:IN_GENRE]->(genre)
return apoc.graph.filterProperties(path, ['plotEmbedding', 'posterEmbedding','plot', 'bio'])
so basically we create the same graph object with the extract that we have for the virtual graph
and then go over the nodes and replace the ones that have one of the properties with virtual ones that wrap the original nodes and leave off the properties
The text was updated successfully, but these errors were encountered:
`apoc.virtual.graph([list-of-paths, nodes, rels], [properties to remove]) -> {nodes, rels}
I want to replace the whole thing by an aggregation function like this:
so basically we create the same graph object with the extract that we have for the virtual graph
and then go over the nodes and replace the ones that have one of the properties with virtual ones that wrap the original nodes and leave off the properties
The text was updated successfully, but these errors were encountered: