Hi there,
Our graph db contains a unique index for name
field. But there are a lot of duplicates because we didn't normalize data earlier.
Can we merge this duplicate nodes if their name's are matching (case insensitively)?
Hi there,
Our graph db contains a unique index for name
field. But there are a lot of duplicates because we didn't normalize data earlier.
Can we merge this duplicate nodes if their name's are matching (case insensitively)?
Apoc has the function you're after - 15.3. Merge Nodes - Chapter 15. Graph Refactoring
You can merge a list of nodes onto the first one in the list.
All relationships are merged onto that node too. You can specify the merge behavior for properties globally and/or individually.
To run it in a case-insensitive way, you might try combining this with the toUpper or toLower string functions - String functions - Cypher Manual