I'm testing the apoc procedure on this set-up:
CREATE (:testNode{id:"1"})-[:TAGS{id:"r1"}]->(:tag{id:"h"})
CREATE (:testNode{id:"2"})-[:TAGS{id:"r2"}]->(:tag{id:"H"})
And then running this:
MATCH (htag:tag), (gtag:tag)
WHERE htag.id=toLower(gtag.id) AND htag<>gtag
WITH htag, gtag LIMIT 1
CALL apoc.refactor.mergeNodes([htag, gtag], {id:'discard'}) YIELD node
RETURN node
As I understand it, {id:'discard'} is supposed to indicate that if htag.id exists, it will be kept and gtag.id will be thrown out. Instead, it seems to be keeping gtag.id.
What am I misunderstanding?