-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
apoc.refactor.mergeNodes choose the result properties randomly #115
Comments
Comment by jexp MergeNodes uses collection order |
Comment by PeterKazmirsky Thanks. But what about relationships. I recently created ticket where I asked to overwrite properties in relationships in procedure mergeNodes. And now I would like to sort properties of relationships and choose the proper one before merging. Is there any solution for that as well ? |
Comment by vga91 With a simple dataset like:
This could be solved in this way:
|
Closing as a workaround was produced and there has been no further comment in over 2 years |
Issue by PeterKazmirsky
Tuesday Feb 19, 2019 at 15:58 GMT
Originally opened as neo4j-contrib/neo4j-apoc-procedures#1107
Guidelines
Imagine that I have user cluster consisting of user ids from different data sources and all users are connected to one Root node. In case that user cluster contains more than one Root node I want to merge this Root nodes to one. For finding the Root nodes in cluster I am using apoc.path.subgraphNodes and the resulting Root nodes I am sending to apoc.refactor.mergeNodes to merge them to one Root node. I also set properties to procedure: mergeRels:true, properties:'overwrite'
Actual Behavior
I cannot influence in what order roots get into procedure apoc.refactor.mergeNodes, so after merging the result Root node and his relationships properties will have random properties.
Expected Behavior
I would like you to consider to add feature to apoc.refactor.mergeNodes where I can tell for example that for merging property "count" choose highest one. Or for "date" property choose latest one.
Thank you.
Versions
Neo4j 3.5.2
Apoc library 3.5.0.1
The text was updated successfully, but these errors were encountered: