Skip to content

Commit 9995aa2

Browse files
change query
1 parent 1f09bd2 commit 9995aa2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules/ROOT/pages/patterns/match-modes.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,12 @@ To show the behavior of `DIFFERENT RELATIONSHIPS`, consider the following query,
5555
The relationships used in this query are directional, meaning paths are traversed following specific directions for each bridge (`-[:BRIDGE]\->`).
5656

5757
.Find paths with a length of 5 relationships from a start node
58-
// tag::patterns_match_modes_different_relationships[]
5958
[source, cypher]
6059
----
6160
MATCH p = (:Location {name: 'Kneiphof'})-[:BRIDGE]->{5}()
6261
RETURN [n IN nodes(p) | n.name] AS locations,
6362
[r IN relationships(p) | r.id] AS crossedBridges // <1>
6463
----
65-
// end::patterns_match_modes_different_relationships[]
6664

6765
<1> The xref:expressions/list-expressions.adoc#list-comprehension[list comprehensions] iterate over nodes and relationships in a path and return specific properties (the `name` property from nodes, and the `id` property from relationships).
6866

@@ -117,11 +115,13 @@ _In the `samplePath` with a length of `6` returned by `DIFFERENT RELATIONSHIPS`,
117115
However, if the relationship count is increased to `7`, `0` paths are returned.
118116

119117
.Find paths with a length of 7 relationships
118+
// tag::patterns_match_modes_different_relationships[]
120119
[source, cypher]
121120
----
122121
MATCH p = (:Location {name: 'Kneiphof'})--{7}()
123122
RETURN count(p) AS pathCount
124123
----
124+
// end::patterns_match_modes_different_relationships[]
125125

126126
.Result
127127
[role="queryresult",options="header,footer",cols="1*<m"]

0 commit comments

Comments
 (0)