Skip to content

Commit f782bf7

Browse files
committed
Prefix the statements with Cypher 25 and minor editorial updates
1 parent 999458c commit f782bf7

File tree

5 files changed

+32
-20
lines changed

5 files changed

+32
-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/notifications/all-notifications.adoc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5344,7 +5344,7 @@ m|GENERIC
53445344
m|INFORMATION
53455345
|===
53465346

5347-
.An identifier used for the index name in a `SEARCH` clause shadowing a variable in scope.
5347+
.An identifier used for the index name in a `SEARCH` clause shadowing a variable in scope
53485348
[.tabbed-example]
53495349
=====
53505350
[.include-with-GQLSTATUS-code]
@@ -5353,6 +5353,7 @@ Query::
53535353
+
53545354
[source,cypher]
53555355
----
5356+
CYPHER 25
53565357
WITH "myPlotString" AS moviePlots
53575358
MATCH (m:Movie {title:'Matrix, The'})
53585359
MATCH (movie:Movie)
@@ -5377,6 +5378,7 @@ Consider to rename the variable to something else to avoid confusion.
53775378
+
53785379
[source,cypher]
53795380
----
5381+
CYPHER 25
53805382
WITH "myPlotString" AS plotString
53815383
MATCH (m:Movie {title:'Matrix, The'})
53825384
MATCH (movie:Movie)
@@ -5394,6 +5396,7 @@ Query::
53945396
+
53955397
[source,cypher]
53965398
----
5399+
CYPHER 25
53975400
WITH "myPlotString" AS moviePlots
53985401
MATCH (m:Movie {title:'Matrix, The'})
53995402
MATCH (movie:Movie)
@@ -5414,6 +5417,7 @@ Consider to rename the variable to something else to avoid confusion.
54145417
+
54155418
[source,cypher]
54165419
----
5420+
CYPHER 25
54175421
WITH "myPlotString" AS plotString
54185422
MATCH (m:Movie {title:'Matrix, The'})
54195423
MATCH (movie:Movie)

0 commit comments

Comments
 (0)