I am new at Neo4J
I have written a query below. I am trying to traverse down the path as show below and to identify any Control nodes that are not attached to a Metric node. I am not particular about the traverse direction, only the connection
MATCH path=(a:Area{Country:"France"})-[b:Scenario]-(c:Threat)-[d:Control]-(e:Control)-[f:Metric]-(g:Metric) WHERE NOT (e)-[f:MetricControl]--(g)
WITH path
MATCH (e) WHERE NOT e IN nodes(path)
RETURN e
However, I keep getting the following errors.
Type mismatch: expected Node but was Relationship (line 2, column 16 (offset: 212))
"WHERE NOT (g)-[f:MetricControl]--(e)"
I was expecting a list of all Control nodes that were part of the Area node that had the property Country :"France" but were not connect to any metric node to be listed.
Any help hints would be greatly appreciated.