Working with advanced path finding
Cypher provides means for variable pathfinding. But it has some limitations, as it is path distinct to make sure we don’t miss any paths. When there are loops in the graph, Cypher can be very memory intensive when we use variable-length paths. Also, if we need to change directions in the traversal or have node label filters, it is not possible in Cypher. This is where APOC provides an option with apoc.path.expandConfig
that provides a lot of options with variable-length path expansion.
The syntax for this procedure looks like this:
apoc.path.expandConfig( startNode <id>|Node|list, ConfigMap ) YIELD path
The config map can have these values:
minLevel maxLevel uniqueness relationshipFilter...