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
Frage
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?
Lösung
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