Hello everyone,
I have a set of nodes (companies) which are related to each other (transactions). For some of those companies (with a label "Scope"), I'm interested in getting their neighborhood of order N. However I would like to identify all outgoing transactions where a specific property verifies a certain condition.
So far, I'm using Variable Length Path to get the neighborhood, but then I would like to apply a WHERE clause to identify which relationships verify the condition to be able to mark them (SET a new property with value 1 for example).
The Cypher query I had in mind would be something like that :
MATCH p = (startCompany)-[r:PAID*1..N]->(endCompany)
WHERE startCompany:Scope
AND ... (edges with condition verified)
SET ... (mark those edges to identify them)
However, I'm not sure how WHERE behaves with paths that have multiple relationsiphs in them : does it filter only if all relationships verify the condition ? Or at least one ?
If someone could help me figure this out (and also has an idea of what the query should look like), it would be great !
I read this first blog article called The Power of the Path – Part 1 which is very interesting, but unfortunately the author didn't add any other parts after that.
Thank you !