Apoc.coll.union not found

I am using Neo4j v 4.2 on Azure with a manual install of apoc-4.3.0-rc01-all.jar. While the documentation of apoc 4.2 shows the procedure apoc.coll.union, I do not see it in the list of procedures. Nor does a query using ... produces an error. Other apoc procedures are working.

My query:

MATCH p=(c1:CB_Match)-[r1:match_segment]->(s)<-[r2:match_segment]-(c2:CB_Match) where c1.RN>0 and c2.RN>0
with c1,c2,s order by c1.fullname,c2.fullname
with s,collect(distinct c1.fullname) as match1,collect(distinct c2.fullname) as match2,(s.end_pos-s.strt_pos)/1000000 as mbp
with s,mbp,match1,match2 where mbp>4
call apoc.coll.union(match1,match2) as matches
with s,mbp,matches where size(matches)<50
RETURN s.Indx,mbp, size(matches) as ct1,matches order by s.chr,s.strt_pos

Hey,

I think apoc.coll.union is a function rather than a procedure. So you'd need to do:

MATCH p=(c1:CB_Match)-[r1:match_segment]->(s)<-[r2:match_segment]-(c2:CB_Match) where c1.RN>0 and c2.RN>0
with c1,c2,s order by c1.fullname,c2.fullname
with s,collect(distinct c1.fullname) as match1,collect(distinct c2.fullname) as match2,(s.end_pos-s.strt_pos)/1000000 as mbp
with s,mbp,match1,match2 where mbp>4
WITH s, mbp, apoc.coll.union(match1,match2) as matches
where size(matches)<50
RETURN s.Indx,mbp, size(matches) as ct1,matches order by s.chr,s.strt_pos
1 Like

Worked perfectly! Thanks