I'm trying to associate two lists, in a one-to-one relationship.
This query is returning the following: all objects in p are merged with only the first element of r.
I need something like id1(n)-[:HAS_ID]-id2(n)
MATCH p=(n:ID1)
MATCH r=(o:ID2)
WITH p, r LIMIT 100
UNWIND nodes(p) AS ids1
UNWIND nodes(r) AS ids2
MERGE (ids1)-[:HAS_ID]->(ids2)
MATCH (a:ID1)
WITH a LIMIT 100
WITH collect(a) AS ids1
MATCH (b:ID2)
WITH ids1, b LIMIT 100
WITH ids1, collect(b) AS ids2
UNWIND range(0, size(ids1)) AS i
MERGE (ids1[i])-[:HAS_ID]->(ids2[i])
MATCH (a:ID1)
WITH a LIMIT 100
WITH collect(a) AS ids1
MATCH (b:ID2)
WITH ids1, b LIMIT 100
WITH ids1, collect(b) AS ids2
UNWIND range(0, size(ids1)-1) AS i
WITH ids1[i] AS n, ids2[i] AS m
MERGE (n)-[:HAS_ID]->(m)