Knowledge Base

How do I display all nodes with no defined labels

Although assigning a node one or more labels provides many benefits (i.e. performance gains from index usage, ability to group nodes into sets, etc), it is possible to create a node without any labels.

The following Cypher can be used to identify all nodes in the graph which have no label defined:

MATCH (n) WHERE size(labels(n)) = 0 RETURN n

Label usage is detailed here.