1

In neo4j, I need to find a route between A and every other node in my collection, where all routes have paths which are "twowheeler" (path type) and have property summer set to true.

How can I do that in neo4j database?

I tried something similar to answer from THIS thread, but it doesn't work for me.

START a=node(1)
MATCH p=(a)-[r:twowheeler*..]-()
WHERE has(r.summer) and r.summer='true'
RETURN p;
Bruno Peres
  • 15,845
  • 5
  • 53
  • 89
TheOpti
  • 1,641
  • 3
  • 21
  • 38

1 Answers1

1

You can add summer: true as a property on the relationship in the match. Something like this...

MATCH p=(a:Node {name: 'A'})-[r:twowheeler* {summer: true}]->()
RETURN p;
Dave Bennett
  • 10,996
  • 3
  • 30
  • 41