Skip to content

Commit f29fc41

Browse files
committed
Prefix the statements with Cypher 25 and minor editorial updates
1 parent e9cd1ce commit f29fc41

File tree

6 files changed

+48
-20
lines changed

6 files changed

+48
-20
lines changed

modules/ROOT/pages/errors/gql-errors/42I69.adoc

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
= 42I69
22

33
== Status description
4-
error: syntax error or access rule violation - invalid search variable reference. `{ <<variable>> }` must reference a variable from the same MATCH statement.
4+
error: syntax error or access rule violation - invalid search variable reference. `{ <<variable>> }` must reference a variable from the same `MATCH` statement.
55

66
== Example scenario
77

88
For example, when trying to use a variable from a previous `MATCH` statement as variable reference in a `SEARCH` clause:
99

1010
[source,cypher]
1111
----
12+
CYPHER 25
1213
MATCH (movie:Movie)
1314
MATCH (m:Movie {title:'Matrix, The'})
1415
SEARCH movie IN (
@@ -19,13 +20,11 @@ MATCH (m:Movie {title:'Matrix, The'})
1920
RETURN movie.title AS title
2021
----
2122

22-
You will receive an error with GQLSTATUS xref:errors/gql-errors/42001.adoc[42001].
23-
This error has a cause with GQLSTATUS 42I69 and status description:
24-
23+
You will receive an error with GQLSTATUS xref:errors/gql-errors/42001.adoc[42001] with a cause with GQLSTATUS 42I69 and status description:
2524

2625
[source]
2726
----
28-
error: syntax error or access rule violation - invalid search variable reference. `movie` must reference a variable from the same MATCH statement.
27+
error: syntax error or access rule violation - invalid search variable reference. `movie` must reference a variable from the same `MATCH` statement.
2928
----
3029

3130
ifndef::backend-pdf[]

modules/ROOT/pages/errors/gql-errors/42I70.adoc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
= 42I70
22

33
== Status description
4-
error: syntax error or access rule violation - search clause with multiple bound variables.In order to have a search clause, a MATCH statement can only have one bound variable.
4+
error: syntax error or access rule violation - search clause with multiple bound variables. In order to have a search clause, a `MATCH` statement can only have one bound variable.
55

66
[#_example_scenario]
77
== Example scenario
@@ -10,6 +10,7 @@ For example, when trying to use a `SEARCH` clause in a `MATCH` statement with mo
1010

1111
[source,cypher]
1212
----
13+
Cypher 25
1314
MATCH (movie:Movie)-[r]->()
1415
SEARCH movie IN (
1516
VECTOR INDEX moviePlots
@@ -19,8 +20,7 @@ MATCH (movie:Movie)-[r]->()
1920
RETURN movie.title AS title, r.prop AS prop
2021
----
2122

22-
You will receive an error with GQLSTATUS xref:errors/gql-errors/42001.adoc[42001].
23-
This error has a cause with GQLSTATUS 42I70 and the status description above.
23+
You will receive an error with GQLSTATUS xref:errors/gql-errors/42001.adoc[42001] with a cause with GQLSTATUS 42I70.
2424

2525
== Possible solution
2626
The first iteration of the `SEARCH` clause comes with many restrictions on the `MATCH` statement.
@@ -29,6 +29,7 @@ For the time being, the Cypher query under xref:errors/gql-errors/42I70.adoc#_ex
2929

3030
[source,cypher]
3131
----
32+
CYPHER 25
3233
MATCH (movie:Movie)
3334
SEARCH movie IN (
3435
VECTOR INDEX moviePlots

modules/ROOT/pages/errors/gql-errors/42I71.adoc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
= 42I71
22

33
== Status description
4-
error: syntax error or access rule violation - search clause with invalid predicates.In order to have a search clause, a MATCH statement can only have predicates on the bound node or relationship.
4+
error: syntax error or access rule violation - search clause with invalid predicates. In order to have a search clause, a `MATCH` statement can only have predicates on the bound node or relationship.
55

66
[#_example_scenario]
77
== Example scenario
@@ -10,6 +10,7 @@ For example, when trying to use a `SEARCH` clause in a `MATCH` statement with pr
1010

1111
[source,cypher]
1212
----
13+
CYPHER 25
1314
MATCH (movie:Movie)-[]->(:Actor)
1415
SEARCH movie IN (
1516
VECTOR INDEX moviePlots
@@ -19,8 +20,7 @@ MATCH (movie:Movie)-[]->(:Actor)
1920
RETURN movie.title AS title
2021
----
2122

22-
You will receive an error with GQLSTATUS xref:errors/gql-errors/42001.adoc[42001].
23-
This error has a cause with GQLSTATUS 42I71 and the status description above.
23+
You will receive an error with GQLSTATUS xref:errors/gql-errors/42001.adoc[42001] with a cause with GQLSTATUS 42I71.
2424

2525
== Possible solution
2626
The first iteration of the `SEARCH` clause comes with many restrictions on the `MATCH` statement.
@@ -29,6 +29,7 @@ For the time being, the Cypher query under xref:errors/gql-errors/42I71.adoc#_ex
2929

3030
[source,cypher]
3131
----
32+
CYPHER 25
3233
MATCH (movie:Movie)
3334
SEARCH movie IN (
3435
VECTOR INDEX moviePlots

modules/ROOT/pages/errors/gql-errors/42I72.adoc

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
= 42I72
22

33
== Status description
4-
error: syntax error or access rule violation - search clause with too complex pattern.In order to have a search clause, a MATCH statement can only have a single node or relationship pattern and no selectors.
4+
error: syntax error or access rule violation - search clause with too complex pattern. In order to have a search clause, a `MATCH` statement can only have a single node or relationship pattern and no selectors.
55

66
[#_example_scenarios]
77
== Example scenarios
88

9-
For example, when trying to use a `SEARCH` clause in a `MATCH` statement with a pattern with several pattern parts:
9+
The following are examples of scenarios that will produce this error:
1010

11+
.Use of a `SEARCH` clause in a `MATCH` statement with a pattern with several pattern parts
1112
[source,cypher]
1213
----
14+
Cypher 25
1315
MATCH (movie:Movie), ()
1416
SEARCH movie IN (
1517
VECTOR INDEX moviePlots
@@ -19,10 +21,10 @@ MATCH (movie:Movie), ()
1921
RETURN movie.title AS title
2022
----
2123

22-
For example, when trying to use a `SEARCH` clause in a `MATCH` statement with a variable length:
23-
24+
.Use of a `SEARCH` clause in a `MATCH` statement with a variable length
2425
[source,cypher]
2526
----
27+
CYPHER 25
2628
MATCH (movie:Movie)-[]->{1,3}()
2729
SEARCH movie IN (
2830
VECTOR INDEX moviePlots
@@ -32,10 +34,10 @@ MATCH (movie:Movie)-[]->{1,3}()
3234
RETURN movie.title AS title
3335
----
3436

35-
For example, when trying to use a `SEARCH` clause in a `MATCH` statement with a selector:
36-
37+
.Use of a `SEARCH` clause in a `MATCH` statement with a selector
3738
[source,cypher]
3839
----
40+
CYPHER 25
3941
MATCH ANY SHORTEST ()-->(movie:Movie)
4042
SEARCH movie IN (
4143
VECTOR INDEX moviePlots
@@ -45,16 +47,17 @@ MATCH ANY SHORTEST ()-->(movie:Movie)
4547
RETURN movie.title AS title
4648
----
4749

48-
In all the above cases, you will receive an error with GQLSTATUS xref:errors/gql-errors/42001.adoc[42001].
49-
This error has a cause with GQLSTATUS 42I72 and the status description above.
50+
In all of the above cases, you will receive an error with GQLSTATUS xref:errors/gql-errors/42001.adoc[42001] with a cause with GQLSTATUS 42I72.
5051

5152
== Possible solution
5253
The first iteration of the `SEARCH` clause comes with many restrictions on the `MATCH` statement.
5354
It is likely that some of these restriction will be lifted in future versions of Neo4j.
5455
For the time being, the Cypher queries under xref:errors/gql-errors/42I72.adoc#_example_scenarios[Example scenarios] can be rewritten like this:
5556

57+
.Use of a `SEARCH` clause in a `MATCH` statement with a pattern with several pattern parts
5658
[source,cypher]
5759
----
60+
CYPHER 25
5861
MATCH (movie:Movie)
5962
SEARCH movie IN (
6063
VECTOR INDEX moviePlots
@@ -65,8 +68,10 @@ MATCH (movie), ()
6568
RETURN movie.title AS title
6669
----
6770

71+
.Use of a `SEARCH` clause in a `MATCH` statement with a variable length
6872
[source,cypher]
6973
----
74+
CYPHER 25
7075
MATCH (movie:Movie)
7176
SEARCH movie IN (
7277
VECTOR INDEX moviePlots
@@ -77,8 +82,10 @@ MATCH (movie)-[]->{1,3}()
7782
RETURN movie.title AS title
7883
----
7984

85+
.Use of a `SEARCH` clause in a `MATCH` statement with a selector
8086
[source,cypher]
8187
----
88+
CYPHER 25
8289
MATCH (movie:Movie)
8390
SEARCH movie IN (
8491
VECTOR INDEX moviePlots

modules/ROOT/pages/errors/gql-errors/index.adoc

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1098,6 +1098,22 @@ Status description:: error: syntax error or access rule violation - unsupported
10981098

10991099
Status description:: error: syntax error or access rule violation - mismatched pattern. Pattern, `{ <<input>>1 }`, does not match input, `{ <<input>>2 }`. Verify that the pattern is valid for constructing `{ <<valueType>> }`.
11001100

1101+
=== xref:errors/gql-errors/42I69.adoc[42I69]
1102+
1103+
Status description:: error: syntax error or access rule violation - invalid search variable reference. `{ <<variable>> }` must reference a variable from the same `MATCH` statement.
1104+
1105+
=== xref:errors/gql-errors/42I70.adoc[42I70]
1106+
1107+
Status description:: error: syntax error or access rule violation - search clause with multiple bound variables. In order to have a search clause, a `MATCH` statement can only have one bound variable.
1108+
1109+
=== xref:errors/gql-errors/42I71.adoc[42I71]
1110+
1111+
Status description:: error: syntax error or access rule violation - search clause with invalid predicates. In order to have a search clause, a `MATCH` statement can only have predicates on the bound node or relationship.
1112+
1113+
=== xref:errors/gql-errors/42I72.adoc[42I72]
1114+
1115+
Status description:: error: syntax error or access rule violation - search clause with too complex pattern. In order to have a search clause, a `MATCH` statement can only have a single node or relationship pattern and no selectors.
1116+
11011117
[role=label--changed-2025.03]
11021118
=== xref:errors/gql-errors/42N00.adoc[42N00]
11031119

modules/ROOT/pages/notifications/all-notifications.adoc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5142,7 +5142,7 @@ m|GENERIC
51425142
m|INFORMATION
51435143
|===
51445144

5145-
.An identifier used for the index name in a `SEARCH` clause shadowing a variable in scope.
5145+
.An identifier used for the index name in a `SEARCH` clause shadowing a variable in scope
51465146
[.tabbed-example]
51475147
=====
51485148
[.include-with-GQLSTATUS-code]
@@ -5151,6 +5151,7 @@ Query::
51515151
+
51525152
[source,cypher]
51535153
----
5154+
CYPHER 25
51545155
WITH "myPlotString" AS moviePlots
51555156
MATCH (m:Movie {title:'Matrix, The'})
51565157
MATCH (movie:Movie)
@@ -5175,6 +5176,7 @@ Consider to rename the variable to something else to avoid confusion.
51755176
+
51765177
[source,cypher]
51775178
----
5179+
CYPHER 25
51785180
WITH "myPlotString" AS plotString
51795181
MATCH (m:Movie {title:'Matrix, The'})
51805182
MATCH (movie:Movie)
@@ -5192,6 +5194,7 @@ Query::
51925194
+
51935195
[source,cypher]
51945196
----
5197+
CYPHER 25
51955198
WITH "myPlotString" AS moviePlots
51965199
MATCH (m:Movie {title:'Matrix, The'})
51975200
MATCH (movie:Movie)
@@ -5212,6 +5215,7 @@ Consider to rename the variable to something else to avoid confusion.
52125215
+
52135216
[source,cypher]
52145217
----
5218+
CYPHER 25
52155219
WITH "myPlotString" AS plotString
52165220
MATCH (m:Movie {title:'Matrix, The'})
52175221
MATCH (movie:Movie)

0 commit comments

Comments
 (0)