Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
12-04-2018 08:13 AM
I have a requirements to merge the duplicate nodes and keep one copy. Issue I am facing is , when i merge nodes, there will be duplicate relationship created. Instead i wants to merge the relationship as well without duplicates.
i tried, but then the relationship is getting duplicated. i want to merge all relationship and keep one copy.
Could you please give some suggestions?
Thanks,
Kailash
Solved! Go to Solution.
12-04-2018 12:55 PM
12-04-2018 08:13 AM
I have put it in stackoverflow as well. an immediate help would be appreciated.
12-04-2018 12:55 PM
12-05-2018 07:12 AM
i am using earlier version of neo4j.
something like this , MATCH (p:People{name:"person1"}) WITH p.name as name, collect(p) as nodes, count( ) as cnt WHERE cnt > 1 WITH head(nodes) as first, tail(nodes) as rest UNWIND rest AS to_delete MATCH (to_delete)-[r:HAS_MET]->(e:name) MERGE (first)-[r1:HAS_MET]->(e) on create SET r1=r SET to_delete.isDuplicate=true RETURN count( ); [link]stackoverflow.com/questions/25315926/… . but here i know only one relationship(HAS_MET) will be consider, how do i consider all the relationship once. –
could you please suggest
12-06-2018 03:09 AM
earlier version
Which one?
All the sessions of the conference are now available online