Database Reference
In-Depth Information
Neo4j provides a number of expander implementations out of the box. The default imple-
mentation, which is the one most commonly used, is StandardExpander .
8.2.1. StandardExpander
Thestandardexpanderisencapsulatedinthe StandardExpander class,anditprovides
a collection of built-in expanders that allow you to specify the relationships you want to
follow, including their direction. The relationships will be expanded in the order they were
added to the graph.
Note
StandardExpander is the default implementation used by the Neo4j Traversal API.
Toillustratetheuseof StandardExpander ,considerthefollowingexample:inasocial
network,peoplewhoworkwitheachotherareconnectedviaa WORKS_WITH relationship,
and people who are close friends are connected via an IS_FRIEND_OF relationship. In
addition, users in the network can link to the films they liked (a LIKES relationship). Fig-
ure 8.4 shows the sample graph we'll be using.
Search WWH ::




Custom Search