Question

I need to find all nodes connected with relation that has attribute fld = email. Neo4j Cypher complains the following as a query with bad syntax:

MATCH (n)-[r:rel*..]-(m) WHERE has(r.fld) and r.fld='email' RETURN n,r,m

What would be the right one?

Was it helpful?

Solution

Best bet:

MATCH (n)-[r:rel {fld: 'email'}]-(m) RETURN n, r, m;

This should match nodes that are connected with a "rel" relationship that has a property "fld" with the value "email".

HTH

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top