From 0d36a78d1c186d9b64e4a183f25f01c3f7a3d8f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jens=20Pryce-=C3=85klundh?= <112686610+JPryce-Aklundh@users.noreply.github.com> Date: Tue, 13 Dec 2022 11:46:51 +0100 Subject: [PATCH] Remove old note about variable length pattern matching in versions 2.x (#255) Currently only removing note, pending restructuring of the page on patterns in collaboration with the Langstar team (set for q1 of 2023). --- modules/ROOT/pages/syntax/patterns.adoc | 9 --------- 1 file changed, 9 deletions(-) diff --git a/modules/ROOT/pages/syntax/patterns.adoc b/modules/ROOT/pages/syntax/patterns.adoc index a5eec11fc..b5644876a 100644 --- a/modules/ROOT/pages/syntax/patterns.adoc +++ b/modules/ROOT/pages/syntax/patterns.adoc @@ -177,15 +177,6 @@ As with nodes, the name of the relationship can always be omitted, as exemplifie [[cypher-pattern-varlength]] == Variable-length pattern matching -[CAUTION] -==== -Variable length pattern matching in versions 2.1.x and earlier does not enforce relationship uniqueness for patterns described within a single `MATCH` clause. -This means that a query such as the following: `MATCH (a)-[r]\->(b), p = (a)-[\*]\->(c) RETURN *, relationships(p) AS rs` may include `r` as part of the `rs` set. -This behavior has changed in versions 2.2.0 and later, in such a way that `r` will be excluded from the result set, as this better adheres to the rules of relationship uniqueness as documented here xref::introduction/uniqueness.adoc[]. -If you have a query pattern that needs to retrace relationships rather than ignoring them as the relationship uniqueness rules normally dictate, you can accomplish this using multiple match clauses, as follows: `MATCH (a)-[r]\->(b) MATCH p = (a)-[*]\->(c) RETURN *, relationships(p)`. -This will work in all versions of Neo4j that support the `MATCH` clause, namely 2.0.0 and later. -==== - Rather than describing a long path using a sequence of many node and relationship descriptions in a pattern, many relationships (and the intermediate nodes) can be described by specifying a length in the relationship description of a pattern. For example: