Greetings,
Sorry if this is posted elsewhere, please point me in that direction if so.
I have a pattern of (a:NodeA)<--(b:NodeB). There can be a many node b to 1 node a. All have the same relationship type.
I want to exclude node a if any of the node b have a specific text.
Here's what I'm trying...
Match (x:NodeX {Title: 'SpecificTitle'})-[rt1:RelType1]->(y:NodeY)-[rt2:RelType2]->(a:NodeA)<-[rt2:RelType3]-(b:NodeB)
Where b.Title contains 'Specific Text'
Return x.Title, a.Title, b.Title
But this still returns the unwanted nodes a, it just doesn't return any node b with the specific text, I'm just filtering out certain nodes b.
I've also tried this...
Match (x:NodeX {Title: 'SpecificTitle'})-[rt1:RelType1]->(y:NodeY)-[rt2:RelType2]->(a:NodeA)<-[rt3:RelType3]-(b:NodeB)
With x,a, collect(b.Title) as bTitle
Where NOT bTitle contains 'Specific Text'
//Unwind bTitle as b //optionally adding this line but still doesn't help
Return x.Title, a.Title, bTitle // or b
But this returns no records.
Again the goal is to exclude all node a if any of the node b have a specific text. I just can't get my head around how to get this result.
Many thanks for any help!