I am using apoc.refactor.mergeNodes to merge nodes.
I have 886 nodes with properties of patient_id and date of service. All the dates of service are in December of the same year.
I have the following code:
CALL apoc.refactor.mergeNodes(nodes, {properties: {
pat_id:'combine',
date:'combine'}, mergeRels:true})
The merged node has a list of 886 patient id's, but it only has 31 dates. It appears that any duplicate values for the dates are dropped. The documentation for this function says that 'combine' will create an array, however it appears to function as a set by only keeping unique values.
I have searched through various apoc functions, but cannot find a way to do this. I also tried to create a property for all the 886 nodes that was a map (for example, date_map: {pat_id:date}), but it appears that you cannot have a map as a property value.
Is there any way to keep duplicate values in the combined node?