Filtering nodes and edges neo4j on shortest path -
is there way run shortest path algorithm in neo4j whilst filtering on edges or nodes > operator. filtering on nodes higher of timestamp?
cheers
to extent, can use query predicates (http://neo4j.com/docs/3.0.1/query-predicates.html).
here example using built-in example movie graph. query finds shortest paths 1 movie
, filters paths go through kevin bacon.
match p = shortestpath((m1:movie)-[*]-(m2:movie)) m1.title = 'the birdcage' , m2.title = 'sleepless in seattle' , any(x in nodes(p) x.name = 'kevin bacon') return p
Comments
Post a Comment