match (n:Node{cat:'rel'})-[:REL{rel:'body'}]->(n2:Node)
match (n2{cat:'ssub'})
or (n2{cat:'conj'})-[:REL{rel:'cnj'}]->(:Node{cat:'ssub'})
or (n2{cat:'du'})-[:REL]->(:Node{cat:'ssub'})
return n;
match (n:Node{cat:'rel'})-[:REL{rel:'body'}]->(n2:Node)
where
(n2{cat:'ssub'})
or (n2{cat:'conj'})-[:REL{rel:'cnj'}]->(:Node{cat:'ssub'})
or (n2{cat:'du'})-[:REL]->(:Node{cat:'ssub'})
return n;
This generates an error:
Neo.ClientError.Statement.SyntaxError: Type mismatch: expected Boolean but was Map (line 3, column 6 (offset: 67))
" (n2{cat:'ssub'}) "
^
match (n:Node{cat:'rel'})-[:REL{rel:'body'}]->(n1:Node)
where (n1{cat:'ssub'}) is not null
or (n1{cat:'conj'})-[:REL{rel:'cnj'}]->(:Node{cat:'ssub'}) is not null
or (n1{cat:'du'})-[:REL]->(:Node{cat:'ssub'}) is not null
return distinct n.sentid as sentid, n.id as id, n1.cat
order by sentid, id;
But I get some results where n1.cat is neither ssub nor conj nor du, so these are clearly wrong.