retrography
6/21/2014 - 5:18 PM

Basic Neo4j Cypher query to link all the individuals in the graph database using the same email address

Basic Neo4j Cypher query to link all the individuals in the graph database using the same email address

MATCH (a:Person), (b:Person {email:a.email})
WHERE HAS(a.email) AND HAS(b.email) 
AND a.email IS NOT NULL AND b.email IS NOT NULL
AND a<>b
CREATE UNIQUE (a)-[i:IS]-(b);