How to find the top most hierarchy in redisgraph since NOT, IS keywords are not supported yet. In normal cypher query language we can do this as below.
MATCH (n:Child) WHERE NOT (n)-[:PARENT]->() RETURN (n);
But NOT keyword is not supported in redisgraph as of now.
This topic is part of stackoverflow question, hoping to find a solution.
If I understand correctly, you’re looking to find all nodes of type Child that do not have an outgoing edge of type :PARENT
In which case, currently I don’t see how you can achieve this with the subset of OpenCypher we have, a quick and easy solution might be introducing a new OUT_DEGREE function which will return the number of outgoing edges from a given node, then you’ll be able to filter on OUT_DEGREE(n, “PARENT”) = 0