MATCH (n)
WHERE NOT (n)-[r]-()
RETURN n;

On Tue, Jan 27, 2015 at 8:45 AM, Linus Nikander <[email protected]>
wrote:

> I want to identify all nodes without relationships to other nodes
> (orphans). I can find some query examples but they only seem to work with
> legacy versions of neo4j. Is there an easy way to accomplish this?
>
> I've tried getting the following old query to work but haven't succeeded
> so far:
>
>
> START root=node(0), n=node(*)
> where not(shortestPath(n-[*..2]-root))
> RETURN n
>
>
> A re-write of the above query or one that accomplishes the same would be
> perfect.
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Neo4j" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to