I'm a newbie in Cypher and Graph DB...I am trying to display a kind of tree from my DB, with a source node, and the downstream leaves. I would like to filter on only the leaves that have only certain labels and where all the relationships have a specific constraint on their properties. Root is a Column1 and I want to arrive on a Column1 as well, but there can be some Column2 in the path
I wrote this:
MATCH p=(:Column1{name:'Root'})-[*1..7]-(:Column1)
WHERE
all(n IN nodes(p)
WHERE all(l in labels(n)
WHERE l IN ['Column1', 'Column2']
)
AND n.deleted='0'
)
AND all(r IN relationships(p)
WHERE r.deleted='0')
RETURN p
When launched in Neo4J browser, the resulting graph is wrong and includes some relationships where deleted='1'. However, if I export the CSV table and look for deleted='1' (or even just 1), there are no result.
So it seems like the query is correct, but somehow, the graphical display will show the relationships where deleted=1.
Is it a bug, is it the query?
I also tried
MATCH (:Column1{name:'Root'})-[*1..7{deleted:'0'}]-(t)
WHERE t:Column1 or t:Column2
RETURN *
but in my DB, it takes forever to complete, compared to the previous query.