Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
09-07-2021 02:18 PM
Hello, I have a list of values and want to find out which ones are NOT in the DB already.
Have tried to put together a cypher query for an hour now but can't seem to figure it out, maybe one of you can help me figure this out.
Solved! Go to Solution.
09-07-2021 03:18 PM
Try this:
Assuming P1, P2, and P3 are your node labels,
WITH [['P1'], ['P2'], ['P3']] as nodes
MATCH (a)
WHERE labels(a) IN nodes
WITH collect(distinct labels(a)) as lbls
with apoc.coll.subtract(nodes, lbls) as notfound
return notfound
09-07-2021 03:18 PM
Try this:
Assuming P1, P2, and P3 are your node labels,
WITH [['P1'], ['P2'], ['P3']] as nodes
MATCH (a)
WHERE labels(a) IN nodes
WITH collect(distinct labels(a)) as lbls
with apoc.coll.subtract(nodes, lbls) as notfound
return notfound
All the sessions of the conference are now available online