cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

mike_blum_neo4j
Graph Buddy

Looks like the documentation for matching on multiple relationship types is out of date?

https://neo4j.com/docs/cypher-manual/current/clauses/match/#match-on-multiple-rel-types

Caused by: org.neo4j.ogm.exception.CypherException: Cypher execution failed with code 'Neo.ClientError.Statement.SyntaxError': The semantics of using colon in the separation of alternative relationship types in conjunction with
the use of variable binding, inlined property predicates, or variable length is no longer supported.
Please separate the relationships types using `:A|B|C` instead (line 1, column 214 (offset: 213))'
4 Comments
intouch_vivek
Graph Steward

Hi @mike.blum_neo4j
Matching Multiple relationship works

MATCH path =()-[:InFLOW|:OutFLOW]-() return path
2X_9_9a4d248142306f19a7c17eec25efc5d977acde50.png

Please let us know if you are facing any specific problem

mike_blum_neo4j
Graph Buddy

This issue affects a 4.0 database but this works in < 4.0 databases:

MATCH path =()-[:InFLOW|:OutFLOW]-() return path

but the same query in my 4.0.3 install throws:

2X_a_a0220dd588b6fb324157dd4da4ba864e14447955.png

intouch_vivek
Graph Steward

It is working for both the sytanx [rel:A|:B] and [rel:A|B]

mike_blum_neo4j
Graph Buddy

Not sure how that's working for you but I found the relationship syntax in the deprecation notes:

https://neo4j.com/docs/cypher-manual/current/deprecations-additions-removals-compatibility/#cypher-d...

MATCH (n)-[:A|:B|:C {foo: 'bar'}]-() RETURN n

Syntax

Removed

Replaced by MATCH (n)-[:A|B|C {foo: 'bar'}]-() RETURN n

MATCH (n)-[x:A|:B|:C]-() RETURN n

Syntax

Removed

Replaced by MATCH (n)-[x:A|B|C]-() RETURN n

MATCH (n)-[x:A|:B|:C*]-() RETURN n

Syntax

Removed

Replaced by MATCH (n)-[x:A|B|C*]-() RETURN n

Regardless if it somehow still works in 4.0.x I think the docs need to be updated to be in alignment with the deprecation notes.