O'Reilly logo

Learning Neo4j 3.x - Second Edition by Rik Van Bruggen, Jérôme Baton

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Checking our values

In either case, we cannot be sure that we can now make the assumption that the hasRestaurant property is present in all the Tower nodes. Fortunately, Cypher gets us covered as it is possible to find the unfinished nodes, thanks to NOT exists(node.property), like in this query:

MATCH (n:Tower) WHERE NOT exists(n.hasRestaurant)RETURN n

Then, it is up to you to flag the nodes as dirty (using a label of your choice), should you decide to exclude them from your queries via this label.

From the nodes, you can find a reason why the value is not set and improve your computation, which I advise you to code as a custom function (or procedure):

On a side note, I remind you that it is possible to define a constraint so that a label ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required