Database Reference
In-Depth Information
Figure 3.13 shows the graph with the added labels.
Figure 3.13. Movie nodes grouped using the label MOVIE
Note
In this example, the node labels supersede the type property for determining which nodes
represent movies, so you can remove one of them. It's recommended that you use labels
wherever possible, simply because they're a built-in feature of the Neo4j database, which
allows greater flexibility with querying and schema-based indexing.
Inadditiontofindingallnodeswithagivenlabel,Neo4jCoreJavaAPIexposesoperations
for finding all nodes with a given label and property, as is done in the following listing.
 
Search WWH ::




Custom Search