What am i trying to do
Being relatively new to Neo4j, I am trying to find specific nodes with Cypher in the Neo4j chart database . The nodes must be connected by a chain of a chain of a certain type with additional relationship conditions :
// Cypher START self = node(3413) MATCH (self)<-[rel:is_parent_of*1..100]-(ancestors) WHERE rel.some_property = 'foo' RETURN DISTINCT ancestors
What's wrong.
If I omitted part of the depth *1..100 , the request will work, but, of course, then only one relationship between self and ancestors will be allowed.
But if I allow ancestors be a few steps away from self by entering a depth of *1..100 , the request fails:
Error: Expected rel as a map, but it was a collection
I thought maybe this syntax defines rel as is_parent_of*1..100 , and not the definition of rel as a relationship of type is_parent_of and allows you to increase the depth of the relationship.
So, I tried to make my intentions understandable with parentheses: [(rel:is_parent_of)*1..100 . But this causes a syntax error.
I would appreciate any help to fix this. Thanks!
fiedl source share