diff --git a/antora.yml b/antora.yml index 726b682d..65bb4a8d 100644 --- a/antora.yml +++ b/antora.yml @@ -1,12 +1,12 @@ name: status-codes title: Status Codes for Errors & Notifications -version: '2025.12' +version: '2026.01' start_page: ROOT:index.adoc nav: - modules/ROOT/content-nav.adoc asciidoc: attributes: page-origin-private: false - neo4j-version: '2025.12' - neo4j-version-exact: '2025.12.1' - neo4j-buildnumber: '2025.12' + neo4j-version: '2026.01' + neo4j-version-exact: '2026.01.3' + neo4j-buildnumber: '2026.01' diff --git a/modules/ROOT/content-nav.adoc b/modules/ROOT/content-nav.adoc index 2211f14d..4791c401 100644 --- a/modules/ROOT/content-nav.adoc +++ b/modules/ROOT/content-nav.adoc @@ -145,6 +145,9 @@ **** xref:errors/gql-errors/22NA9.adoc[] **** xref:errors/gql-errors/22NAA.adoc[] **** xref:errors/gql-errors/22NAB.adoc[] +**** xref:errors/gql-errors/22NAC.adoc[] +**** xref:errors/gql-errors/22NAD.adoc[] +**** xref:errors/gql-errors/22NAE.adoc[] **** xref:errors/gql-errors/22NB0.adoc[] **** xref:errors/gql-errors/22NB1.adoc[] **** xref:errors/gql-errors/22NB2.adoc[] @@ -285,6 +288,11 @@ **** xref:errors/gql-errors/42I66.adoc[] **** xref:errors/gql-errors/42I67.adoc[] **** xref:errors/gql-errors/42I68.adoc[] +**** xref:errors/gql-errors/42I69.adoc[] +**** xref:errors/gql-errors/42I70.adoc[] +**** xref:errors/gql-errors/42I71.adoc[] +**** xref:errors/gql-errors/42I72.adoc[] +**** xref:errors/gql-errors/42I76.adoc[] **** xref:errors/gql-errors/42N00.adoc[] **** xref:errors/gql-errors/42N01.adoc[] **** xref:errors/gql-errors/42N02.adoc[] diff --git a/modules/ROOT/pages/errors/all-errors.adoc b/modules/ROOT/pages/errors/all-errors.adoc index e567c014..e9a13538 100644 --- a/modules/ROOT/pages/errors/all-errors.adoc +++ b/modules/ROOT/pages/errors/all-errors.adoc @@ -149,6 +149,9 @@ If you want to drop the index, you must also drop the constraint. | Neo.ClientError.Schema.RepeatedRelationshipTypeInSchema | Unable to create an index or a constraint because the schema had a repeated relationship type. +| Neo.ClientError.Schema.SchemaRuleEntrySizeLimitError +| A schema rule entry exceeded the maximum allowed size. + | Neo.ClientError.Schema.TokenLengthError | A token name, such as a label, relationship type or property key is too long @@ -491,4 +494,3 @@ Please restore from backup. | The database was unable to terminate the transaction. |=== - diff --git a/modules/ROOT/pages/errors/gql-errors/22N31.adoc b/modules/ROOT/pages/errors/gql-errors/22N31.adoc index ef167172..55394aa1 100644 --- a/modules/ROOT/pages/errors/gql-errors/22N31.adoc +++ b/modules/ROOT/pages/errors/gql-errors/22N31.adoc @@ -2,7 +2,50 @@ == Status description -error: data exception - invalid properties in merge pattern. `MERGE` cannot be used with graph element property values that are null or NaN. +error: data exception - invalid properties in merge pattern. The `{ <> }` property `{ <> }` in `{ <> }` is invalid. `MERGE` cannot be used with a graph element property value that is `{ <> }`. + +== Explanation +This error occurs when a `MERGE` pattern includes a node or relationship property value that is not allowed, such as `null` or `NaN`. +Because `MERGE` must be able to match or create a concrete graph element, these invalid values are rejected. + +== Example scenarios + +Let's take the following example scenarios: + +=== Null property value in a `MERGE` pattern +For example, try to merge a node with a `null` property value as follows: + +[source,cypher] +---- +MERGE (p:Person {age: null}) +---- + +The query returns an error with GQLSTATUS 22N31 and the status description: + +[source] +---- +error: data exception - invalid properties in merge pattern. The node property 'age' in '(:Person {age: null})' is invalid. `MERGE` cannot be used with a graph element property value that is null. +---- + +In this case, provide a concrete value for the property, or remove it from the `MERGE` pattern. + +=== NaN property value in a `MERGE` pattern +For example, try to merge a relationship with a `NaN` property value as follows: + +[source,cypher] +---- +WITH 0.0/0.0 AS nan +MERGE (a:Person)-[:KNOWS {score: nan}]->(b:Person) +---- + +The query returns an error with GQLSTATUS 22N31 and the status description: + +[source] +---- +error: data exception - invalid properties in merge pattern. The relationship property 'score' in '(:Person)-[:KNOWS {score: NaN}]->(:Person)' is invalid. 'MERGE' cannot be used with graph element property value that is NaN. +---- + +In this case, provide a numeric value for the property, or remove it from the `MERGE` pattern. ifndef::backend-pdf[] diff --git a/modules/ROOT/pages/errors/gql-errors/22NAC.adoc b/modules/ROOT/pages/errors/gql-errors/22NAC.adoc new file mode 100644 index 00000000..91249d53 --- /dev/null +++ b/modules/ROOT/pages/errors/gql-errors/22NAC.adoc @@ -0,0 +1,40 @@ += 22NAC + +== Status description +error: data exception - characters after quote in CSV field. Characters after an ending quote in a CSV field are not supported. See `{ <> }` at position `{ <> }`. This is read as `{ <> }`. + +== Explanation +When a CSV file contains a field that starts with a quote and has content after the ending quote, the file is formatted incorrectly, and trying to read such a file with `LOAD CSV` will result in an error. + +== Example scenario + +For example, let's say you have a CSV file, called `somefile.csv`, with the following content: + +[source,csv] +---- +x,y +"x",1 +"y"y,2 +---- + +Then, when you run the following query: + +[source,cypher] +---- +LOAD CSV 'somefile.csv' AS line +RETURN count(line) +---- + +you will receive an error with GQLSTATUS 22NAC and status description: + +[source] +---- +error: data exception - characters after quote in CSV field. Characters after an ending quote in a CSV field are not supported. See 'somefile.csv' at position 14. This is read as `y"y` . +---- + +ifndef::backend-pdf[] +[discrete.glossary] +== Glossary + +include::partial$glossary.adoc[] +endif::[] \ No newline at end of file diff --git a/modules/ROOT/pages/errors/gql-errors/22NAD.adoc b/modules/ROOT/pages/errors/gql-errors/22NAD.adoc new file mode 100644 index 00000000..d6aac8c2 --- /dev/null +++ b/modules/ROOT/pages/errors/gql-errors/22NAD.adoc @@ -0,0 +1,40 @@ += 22NAD + +== Status description +error: data exception - missing end quote in CSV field. Missing end quote at position `{ <> }` in `{ <> }`. + +== Explanation +When a CSV file contains a field that starts with a quote but misses an ending quote, the file is formatted incorrectly and trying to read such a file with `LOAD CSV` will result in an error. + +== Example scenario + +For example, let's say you have a CSV file, called `somefile.csv`, with the following content: + +[source,csv] +---- +x,y +"x",1 +"y,2 +---- + +Then, when you run the following query: + +[source,cypher] +---- +LOAD CSV 'somefile.csv' AS line +RETURN count(line) +---- + +you will receive an error with GQLSTATUS 22NAD and status description: + +[source] +---- +error: data exception - missing end quote in CSV field. Missing end quote at position 15 in 'somefile.csv'. +---- + +ifndef::backend-pdf[] +[discrete.glossary] +== Glossary + +include::partial$glossary.adoc[] +endif::[] diff --git a/modules/ROOT/pages/errors/gql-errors/22NAE.adoc b/modules/ROOT/pages/errors/gql-errors/22NAE.adoc new file mode 100644 index 00000000..da7479e2 --- /dev/null +++ b/modules/ROOT/pages/errors/gql-errors/22NAE.adoc @@ -0,0 +1,41 @@ += 22NAE + +== Status description +error: data exception - multi-line field in illegal CSV context. Multi-line fields are illegal in this context. Verify that there is not a missing end quote in `{ <> }` at position `{ <> }`. + +== Explanation +This error is thrown when a CSV file contains a field that spans multiple lines, but the context in which it is being read does not allow multi-line fields. +This often occurs when there is a missing end quote in a quoted field. + +== Example scenario + +For example, let's say you have a CSV file, called `somefile.csv`, with the following content: +[source,csv] +---- +x,y +"x",1 +"y +",2 +---- + +And that the `neo4j` database logging is configured with specific allowed multiline files, but where `somefile.csv` is not among them. + +Then, when you run the following query: +[source,cypher] +---- +LOAD CSV 'somefile.csv' AS line +RETURN count(line) +---- + +you will receive an error with GQLSTATUS 22NAE and status description: +[source] +---- +error: data exception - multi-line field in illegal CSV context. Multi-line fields are illegal in this context. Verify that there is not a missing end quote in 'somefile.csv' at position 15. +---- + +ifndef::backend-pdf[] +[discrete.glossary] +== Glossary + +include::partial$glossary.adoc[] +endif::[] diff --git a/modules/ROOT/pages/errors/gql-errors/42I69.adoc b/modules/ROOT/pages/errors/gql-errors/42I69.adoc new file mode 100644 index 00000000..06c02a28 --- /dev/null +++ b/modules/ROOT/pages/errors/gql-errors/42I69.adoc @@ -0,0 +1,35 @@ += 42I69 + +== Status description +error: syntax error or access rule violation - invalid search variable reference. `{ <> }` must reference a variable from the same `MATCH` statement. + +== Example scenario + +For example, when trying to use a variable from a previous `MATCH` statement as variable reference in a `SEARCH` clause: + +[source,cypher] +---- +CYPHER 25 +MATCH (movie:Movie) +MATCH (m:Movie {title:'Matrix, The'}) + SEARCH movie IN ( + VECTOR INDEX moviePlots + FOR [1, 2, 3] + LIMIT 5 + ) +RETURN movie.title AS title +---- + +You will receive an error with GQLSTATUS xref:errors/gql-errors/42001.adoc[42001] with a cause with GQLSTATUS 42I69 and status description: + +[source] +---- +error: syntax error or access rule violation - invalid search variable reference. `movie` must reference a variable from the same `MATCH` statement. +---- + +ifndef::backend-pdf[] +[discrete.glossary] +== Glossary + +include::partial$glossary.adoc[] +endif::[] \ No newline at end of file diff --git a/modules/ROOT/pages/errors/gql-errors/42I70.adoc b/modules/ROOT/pages/errors/gql-errors/42I70.adoc new file mode 100644 index 00000000..c0bb955e --- /dev/null +++ b/modules/ROOT/pages/errors/gql-errors/42I70.adoc @@ -0,0 +1,48 @@ += 42I70 + +== 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. + +[#_example_scenario] +== Example scenario + +For example, when trying to use a `SEARCH` clause in a `MATCH` statement with more than one bound variable: + +[source,cypher] +---- +Cypher 25 +MATCH (movie:Movie)-[r]->() + SEARCH movie IN ( + VECTOR INDEX moviePlots + FOR [1, 2, 3] + LIMIT 5 + ) +RETURN movie.title AS title, r.prop AS prop +---- + +You will receive an error with GQLSTATUS xref:errors/gql-errors/42001.adoc[42001] with a cause with GQLSTATUS 42I70. + +== Possible solution +The first iteration of the `SEARCH` clause comes with many restrictions on the `MATCH` statement. +It is likely that some of these restriction will be lifted in future versions of Neo4j. +For the time being, the Cypher query under xref:errors/gql-errors/42I70.adoc#_example_scenario[Example scenario] can be rewritten like this: + +[source,cypher] +---- +CYPHER 25 +MATCH (movie:Movie) + SEARCH movie IN ( + VECTOR INDEX moviePlots + FOR [1, 2, 3] + LIMIT 5 + ) +MATCH (movie)-[r]->() +RETURN movie.title AS title, r.prop AS prop +---- + +ifndef::backend-pdf[] +[discrete.glossary] +== Glossary + +include::partial$glossary.adoc[] +endif::[] \ No newline at end of file diff --git a/modules/ROOT/pages/errors/gql-errors/42I71.adoc b/modules/ROOT/pages/errors/gql-errors/42I71.adoc new file mode 100644 index 00000000..db418452 --- /dev/null +++ b/modules/ROOT/pages/errors/gql-errors/42I71.adoc @@ -0,0 +1,48 @@ += 42I71 + +== 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. + +[#_example_scenario] +== Example scenario + +For example, when trying to use a `SEARCH` clause in a `MATCH` statement with predicates on other parts of the pattern than the bound variable: + +[source,cypher] +---- +CYPHER 25 +MATCH (movie:Movie)-[]->(:Actor) + SEARCH movie IN ( + VECTOR INDEX moviePlots + FOR [1, 2, 3] + LIMIT 5 + ) +RETURN movie.title AS title +---- + +You will receive an error with GQLSTATUS xref:errors/gql-errors/42001.adoc[42001] with a cause with GQLSTATUS 42I71. + +== Possible solution +The first iteration of the `SEARCH` clause comes with many restrictions on the `MATCH` statement. +It is likely that some of these restriction will be lifted in future versions of Neo4j. +For the time being, the Cypher query under xref:errors/gql-errors/42I71.adoc#_example_scenario[Example scenario] can be rewritten like this: + +[source,cypher] +---- +CYPHER 25 +MATCH (movie:Movie) + SEARCH movie IN ( + VECTOR INDEX moviePlots + FOR [1, 2, 3] + LIMIT 5 + ) +MATCH (movie)-[]->(:Actor) +RETURN movie.title AS title +---- + +ifndef::backend-pdf[] +[discrete.glossary] +== Glossary + +include::partial$glossary.adoc[] +endif::[] \ No newline at end of file diff --git a/modules/ROOT/pages/errors/gql-errors/42I72.adoc b/modules/ROOT/pages/errors/gql-errors/42I72.adoc new file mode 100644 index 00000000..5afdd6dd --- /dev/null +++ b/modules/ROOT/pages/errors/gql-errors/42I72.adoc @@ -0,0 +1,104 @@ += 42I72 + +== 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. + +[#_example_scenarios] +== Example scenarios + +The following are examples of scenarios that will produce this error: + +.Use of a `SEARCH` clause in a `MATCH` statement with a pattern with several pattern parts +[source,cypher] +---- +Cypher 25 +MATCH (movie:Movie), () + SEARCH movie IN ( + VECTOR INDEX moviePlots + FOR [1, 2, 3] + LIMIT 5 + ) +RETURN movie.title AS title +---- + +.Use of a `SEARCH` clause in a `MATCH` statement with a variable length +[source,cypher] +---- +CYPHER 25 +MATCH (movie:Movie)-[]->{1,3}() + SEARCH movie IN ( + VECTOR INDEX moviePlots + FOR [1, 2, 3] + LIMIT 5 + ) +RETURN movie.title AS title +---- + +.Use of a `SEARCH` clause in a `MATCH` statement with a selector +[source,cypher] +---- +CYPHER 25 +MATCH ANY SHORTEST ()-->(movie:Movie) + SEARCH movie IN ( + VECTOR INDEX moviePlots + FOR [1, 2, 3] + LIMIT 5 + ) +RETURN movie.title AS title +---- + +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. + +== Possible solution +The first iteration of the `SEARCH` clause comes with many restrictions on the `MATCH` statement. +It is likely that some of these restriction will be lifted in future versions of Neo4j. +For the time being, the Cypher queries under xref:errors/gql-errors/42I72.adoc#_example_scenarios[Example scenarios] can be rewritten like this: + +.Use of a `SEARCH` clause in a `MATCH` statement with a pattern with several pattern parts +[source,cypher] +---- +CYPHER 25 +MATCH (movie:Movie) + SEARCH movie IN ( + VECTOR INDEX moviePlots + FOR [1, 2, 3] + LIMIT 5 + ) +MATCH (movie), () +RETURN movie.title AS title +---- + +.Use of a `SEARCH` clause in a `MATCH` statement with a variable length +[source,cypher] +---- +CYPHER 25 +MATCH (movie:Movie) + SEARCH movie IN ( + VECTOR INDEX moviePlots + FOR [1, 2, 3] + LIMIT 5 + ) +MATCH (movie)-[]->{1,3}() +RETURN movie.title AS title +---- + +.Use of a `SEARCH` clause in a `MATCH` statement with a selector +[source,cypher] +---- +CYPHER 25 +MATCH (movie:Movie) + SEARCH movie IN ( + VECTOR INDEX moviePlots + FOR [1, 2, 3] + LIMIT 5 + ) +MATCH ANY SHORTEST ()-->(movie) +RETURN movie.title AS title +---- + +ifndef::backend-pdf[] +[discrete.glossary] +== Glossary + +include::partial$glossary.adoc[] +endif::[] \ No newline at end of file diff --git a/modules/ROOT/pages/errors/gql-errors/42I76.adoc b/modules/ROOT/pages/errors/gql-errors/42I76.adoc new file mode 100644 index 00000000..33a78052 --- /dev/null +++ b/modules/ROOT/pages/errors/gql-errors/42I76.adoc @@ -0,0 +1,45 @@ + += 42I76 + +== Status description +error: syntax error or access rule violation - index or constraint value too long. The provided index or constraint `{ <> }` `{ <> }` (`{ <>1 }` bytes) exceeded limit of `{ <>2 }` bytes. + +== Explanation +This error occurs when a schema rule (index/constraint) entry is too large. + +== Example scenario + +You are running a Neo4j 2026.01 binary with an earlier kernel version, on a block-format database, and you try to create an index with a very large name `$largeIndexName`, which would be a little under 8KiB or more when UTF-8 encoded. +For example, `$largeIndexName` is approximately 8KiB long, and starts with the following: + +[source,cypher] +---- +:param largeIndexName => `A very long index name that would be encoded to around 8KiB of UTF-8 encoded data should ideally be gracefully handled, etc...` +---- + +When you run the following Cypher statement: + +[source,cypher] +---- +CREATE INDEX $largeIndexName +FOR (n:Person) ON (n.name) +---- + +You will receive an error with GQLSTATUS xref:errors/gql-errors/42I76.adoc[42I76]: + +[source] +---- +error: syntax error or access rule violation - index or constraint value too long. The provided index or constraint name 'A very long index name that would be encoded to around 8KiB of UTF-8 encoded data should ideally be ...' (8315 bytes) exceeded limit of 8136 bytes. + +---- + +== Possible solution + +Reduce the size of the index or constraint name so that it is under the byte limit. + +ifndef::backend-pdf[] +[discrete.glossary] +== Glossary + +include::partial$glossary.adoc[] +endif::[] \ No newline at end of file diff --git a/modules/ROOT/pages/errors/gql-errors/51N63.adoc b/modules/ROOT/pages/errors/gql-errors/51N63.adoc index b7c81b6c..1c5baac1 100644 --- a/modules/ROOT/pages/errors/gql-errors/51N63.adoc +++ b/modules/ROOT/pages/errors/gql-errors/51N63.adoc @@ -1,7 +1,12 @@ = 51N63 == Status description -error: system configuration or operation exception - index is still populating. Index is not ready yet. Wait until it finishes populating and retry the transaction. +error: system configuration or operation exception - index is still populating. Index `{ <> }` is not ready yet. Wait until it finishes populating and retry the transaction. + +== Explanation +An index cannot be used while its `state` is `POPULATING`, which occurs immediately after it is created. +To check the `state` of an index -- whether it is `ONLINE` (usable) or `POPULATING` (still being built; the `populationPercent` column shows the progress of the index creation) -- run the following command: `SHOW INDEXES`. +To wait for an index to come online, see procedures link:https://neo4j.com/docs/operations-manual/2025.12/procedures/#procedure_db_awaitIndex[db.awaitIndex()] and link:https://neo4j.com/docs/operations-manual/2025.12/procedures/#procedure_db_awaitIndexes[db.awaitIndexes()]. ifndef::backend-pdf[] [discrete.glossary] diff --git a/modules/ROOT/pages/errors/gql-errors/index.adoc b/modules/ROOT/pages/errors/gql-errors/index.adoc index 84f6ccec..4822131e 100644 --- a/modules/ROOT/pages/errors/gql-errors/index.adoc +++ b/modules/ROOT/pages/errors/gql-errors/index.adoc @@ -282,7 +282,7 @@ Status description:: error: data exception - missing temporal unit. At least one === xref:errors/gql-errors/22N31.adoc[22N31] -Status description:: error: data exception - invalid properties in merge pattern. `MERGE` cannot be used with graph element property values that are null or NaN. +Status description:: error: data exception - invalid properties in merge pattern. The `{ <> }` property `{ <> }` in `{ <> }` is invalid. `MERGE` cannot be used with a graph element property value that is `{ <> }`. === xref:errors/gql-errors/22N32.adoc[22N32] @@ -584,6 +584,18 @@ Status description:: error: data exception - invalid list for property-based acc Status description:: error: data exception - mixed type list for property-based access control rule. The expression `{ <> }` is not supported. All elements in a list must be literals of the same type for property-based access control. +=== xref:errors/gql-errors/22NAC.adoc[22NAC] + +Status description:: error: data exception - characters after quote in CSV field. Characters after an ending quote in a CSV field are not supported. See `{ <> }` at position `{ <> }`. This is read as `{ <> }`. + +=== xref:errors/gql-errors/22NAD.adoc[22NAD] + +Status description:: error: data exception - missing end quote in CSV field. Missing end quote at position `{ <> }` in `{ <> }`. + +=== xref:errors/gql-errors/22NAE.adoc[22NAE] + +Status description:: error: data exception - multi-line field in illegal CSV context. Multi-line fields are illegal in this context. Verify that there is not a missing end quote in `{ <> }` at position `{ <> }`. + === xref:errors/gql-errors/22NB0.adoc[22NB0] Status description:: error: data exception - invalid property-based access control rule involving `WHERE` and `IS NULL`. The property value access rule pattern `{ <> }` always evaluates to `NULL`. Use `WHERE` syntax in combination with `IS NULL` instead. @@ -1155,6 +1167,26 @@ Status description:: error: syntax error or access rule violation - unsupported Status description:: error: syntax error or access rule violation - mismatched pattern. Pattern, `{ <>1 }`, does not match input, `{ <>2 }`. Verify that the pattern is valid for constructing `{ <> }`. +=== xref:errors/gql-errors/42I69.adoc[42I69] + +Status description:: error: syntax error or access rule violation - invalid search variable reference. `{ <> }` must reference a variable from the same `MATCH` statement. + +=== xref:errors/gql-errors/42I70.adoc[42I70] + +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. + +=== xref:errors/gql-errors/42I71.adoc[42I71] + +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. + +=== xref:errors/gql-errors/42I72.adoc[42I72] + +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. + +=== xref:errors/gql-errors/42I76.adoc[42I76] + +Status description:: error: syntax error or access rule violation - index or constraint value too long. The provided index or constraint `{ <> }` `{ <> }` (`{ <>1 }` bytes) exceeded limit of `{ <>2 }` bytes. + === xref:errors/gql-errors/42N00.adoc[42N00] Status description:: error: syntax error or access rule violation - graph reference not found. A graph reference with the name `{ <> }` was not found. Verify that the spelling is correct. @@ -1974,7 +2006,7 @@ Status description:: error: system configuration or operation exception - index === xref:errors/gql-errors/51N63.adoc[51N63] -Status description:: error: system configuration or operation exception - index is still populating. Index is not ready yet. Wait until it finishes populating and retry the transaction. +Status description:: error: system configuration or operation exception - index is still populating. Index `{ <> }` is not ready yet. Wait until it finishes populating and retry the transaction. === xref:errors/gql-errors/51N64.adoc[51N64] diff --git a/modules/ROOT/pages/notifications/all-notifications.adoc b/modules/ROOT/pages/notifications/all-notifications.adoc index 8839f92c..69abdef7 100644 --- a/modules/ROOT/pages/notifications/all-notifications.adoc +++ b/modules/ROOT/pages/notifications/all-notifications.adoc @@ -1310,6 +1310,7 @@ a| To continue using it, escape the identifier by adding backticks around the identifier `%s`. - The character with the Unicode representation `%s` is deprecated for unescaped identifiers and will not be supported in the future. To continue using it, escape the identifier by adding backticks around the identifier `%s`. +- `%s` subquery without a variable scope clause is deprecated. Use CALL (`%s`) { ... } - All subqueries in a `UNION [ALL]` should have the same ordering for the return columns. [NOTE] In versions 5.5 to 5.25, using differently ordered return items in a `UNION [ALL]` clause is deprecated. @@ -1626,6 +1627,73 @@ The Unicode character `\u0085` is deprecated for unescaped identifiers and will ====== ===== +.Using a CALL subquery scope without a variable scope clause +[.tabbed-example] +===== +[.include-with-GQLSTATUS-code] +====== +Query:: ++ +[source,cypher] +---- +WITH 42 AS nbr +CALL { + WITH nbr + RETURN nbr + 3 AS otherNbr +} +RETURN otherNbr +---- + +Returned GQLSTATUS code:: +01N00 + +Returned status description:: +warn: feature deprecated. +`CALL` subquery without a variable scope clause is deprecated. Use `CALL (nbr) {...}` + +Suggestions for improvement:: +Replace the importing `WITH` with a variable scope clause. ++ +[source,cypher] +---- +WITH 42 AS nbr +CALL (nbr) { + RETURN nbr + 3 AS otherNbr +} +RETURN otherNbr +---- + +====== +[.include-with-neo4j-code] +====== +Query:: ++ +[source,cypher] +---- +WITH 42 AS nbr +CALL { + WITH nbr + RETURN nbr + 3 AS otherNbr +} +RETURN otherNbr +---- +Description of the returned code:: +`CALL` subquery without a variable scope clause is deprecated. Use `CALL (nbr) {...}` + +Suggestions for improvement:: +Replace the importing `WITH` with a variable scope clause. ++ +[source,cypher] +---- +WITH 42 AS nbr +CALL (nbr) { + RETURN nbr + 3 AS otherNbr +} +RETURN otherNbr +---- +====== +===== + .Deprecated function namespace [.tabbed-example] ===== @@ -2911,6 +2979,33 @@ m|DEPRECATION m|WARNING |=== +[#_neo_clientnotification_request_repl] +=== Feature deprecated with replacement - API Request + +.Notification details +[cols="<1s,<4"] +|=== +|Neo4j code +m|Neo.ClientNotification.Request.FeatureDeprecationWarning +|Title +a|This feature is deprecated and will be removed in future versions. +|Description +a| +`%s` is deprecated. It is replaced by `%s`. +|Category +m|DEPRECATION +|GQLSTATUS code +m|01N01 +|Status description +a|warn: feature deprecated with replacement. +`{ <>1 }` is deprecated. +It is replaced by `{ <>2 }`. +|Classification +m|DEPRECATION +|SeverityLevel +m|WARNING +|=== + [#_neo_clientnotification_request_] === Feature deprecated with replacement - DeprecatedFormat @@ -5073,14 +5168,14 @@ m|Neo.ClientNotification.Statement.SubqueryVariableShadowing a|Variable in subquery is shadowing a variable with the same name from the outer scope. |Description |Variable in subquery is shadowing a variable with the same name from the outer scope. -If you want to use that variable instead, it must be imported into the subquery using importing WITH clause. (`%s`) +If you want to use that variable instead, it must be imported into the subquery using a variable scope clause. (`%s`) |Category m|GENERIC |GQLSTATUS code m|03N60 |Status description a|info: subquery variable shadowing. -The variable `{ <> }` in the subquery uses the same name as a variable from the outer query. Use `WITH { <> }` in the subquery to import the one from the outer scope unless you want it to be a new variable. +The variable `{ <> }` in the subquery uses the same name as a variable from the outer query. Use `{ <> } ({ <> })` to import the one from the outer scope unless you want it to be a new variable. |Classification m|GENERIC |SeverityLevel @@ -5110,17 +5205,16 @@ Returned GQLSTATUS code:: Returned status description:: info: subquery variable shadowing. The variable `n` in the subquery uses the same name as a variable from the outer query. -Use `WITH n` in the subquery to import the one from the outer scope unless you want it to be a new variable. +Use `CALL (n)` to import the one from the outer scope unless you want it to be a new variable. Suggestions for improvement:: If the intended behavior of the query is for the variable in the subquery to be a new variable, then nothing needs to be done. -If the intended behavior is to use the variable from the outer query, it needs to be imported to the subquery using the `WITH` clause. +If the intended behavior is to use the variable from the outer query, it needs to be imported to the subquery using a variable scope clause. + [source,cypher] ---- MATCH (n) -CALL { - WITH n +CALL (n) { MATCH (n)--(m) RETURN m } @@ -5143,17 +5237,16 @@ RETURN * Description of the returned code:: Variable in subquery is shadowing a variable with the same name from the outer scope. -If you want to use that variable instead, it must be imported into the subquery using importing `WITH` clause. (the shadowing variable is: `n`) +If you want to use that variable instead, it must be imported into the subquery using a variable scope clause. (the shadowing variable is: `n`) Suggestions for improvement:: If the intended behavior of the query is for the variable in the subquery to be a new variable, then nothing needs to be done. -If the intended behavior is to use the variable from the outer query, it needs to be imported to the subquery using the `WITH` clause. +If the intended behavior is to use the variable from the outer query, it needs to be imported to the subquery using a variable scope clause. + [source,cypher] ---- MATCH (n) -CALL { - WITH n +CALL (n) { MATCH (n)--(m) RETURN m } @@ -5317,6 +5410,120 @@ CALL (x) { ====== ===== +[#_neo_clientnotification_statement_identifiershadowingvariable] +=== Identifier shadowing variable + +.Notification details +[cols="<1s,<4"] +|=== +|Neo4j code +m|Neo.ClientNotification.Statement.IdentifierShadowingVariable +|Title +a|An identifier is shadowing a variable in scope. +|Description +|The identifier `%s` in the `%s` clause has the same name as a variable in scope. +Regardless of what the variable evaluates to, it is the literal `%s` that will be used. +|Category +m|GENERIC +|GQLSTATUS code +m|03N63 +|Status description +a|info: identifier shadowing variable. +The identifier { <> } in the { <> } clause has the same name as a variable in scope. +Regardless of what the variable evaluates to, it is the literal { <> } that will be used. +|Classification +m|GENERIC +|SeverityLevel +m|INFORMATION +|=== + +.An identifier used for the index name in a `SEARCH` clause shadowing a variable in scope +[.tabbed-example] +===== +[.include-with-GQLSTATUS-code] +====== +Query:: ++ +[source,cypher] +---- +CYPHER 25 +WITH "myPlotString" AS moviePlots +MATCH (m:Movie {title:'Matrix, The'}) +MATCH (movie:Movie) + SEARCH movie IN ( + VECTOR INDEX moviePlots + FOR m.embedding + LIMIT 5 + ) SCORE AS score +RETURN movie.title AS title, score, moviePlots +---- + +Returned GQLSTATUS code:: +03N63 + +Description of the returned code:: +info: identifier shadowing variable. +The identifier `moviePlots` in the `VECTOR INDEX` clause has the same name as a variable in scope. +Regardless of what the variable evaluates to, it is the literal `moviePlots` that will be used. + +Suggestions for improvement:: +Consider to rename the variable to something else to avoid confusion. ++ +[source,cypher] +---- +CYPHER 25 +WITH "myPlotString" AS plotString +MATCH (m:Movie {title:'Matrix, The'}) +MATCH (movie:Movie) + SEARCH movie IN ( + VECTOR INDEX moviePlots + FOR m.embedding + LIMIT 5 + ) SCORE AS score +RETURN movie.title AS title, score, plotString +---- +====== +[.include-with-neo4j-code] +====== +Query:: ++ +[source,cypher] +---- +CYPHER 25 +WITH "myPlotString" AS moviePlots +MATCH (m:Movie {title:'Matrix, The'}) +MATCH (movie:Movie) + SEARCH movie IN ( + VECTOR INDEX moviePlots + FOR m.embedding + LIMIT 5 + ) SCORE AS score +RETURN movie.title AS title, score, moviePlots +---- + +Description of the returned code:: +The identifier `moviePlots` in the `VECTOR INDEX` clause has the same name as a variable in scope. +Regardless of what the variable evaluates to, it is the literal `moviePlots` that will be used. + +Suggestions for improvement:: +Consider to rename the variable to something else to avoid confusion. ++ +[source,cypher] +---- +CYPHER 25 +WITH "myPlotString" AS plotString +MATCH (m:Movie {title:'Matrix, The'}) +MATCH (movie:Movie) + SEARCH movie IN ( + VECTOR INDEX moviePlots + FOR m.embedding + LIMIT 5 + ) SCORE AS score +RETURN movie.title AS title, score, plotString +---- +====== +===== + [#_neo_clientnotification_statement_parameternotprovided] === Parameter missing diff --git a/modules/ROOT/partials/glossary.adoc b/modules/ROOT/partials/glossary.adoc index 4d133ca5..41453e22 100644 --- a/modules/ROOT/partials/glossary.adoc +++ b/modules/ROOT/partials/glossary.adoc @@ -47,11 +47,12 @@ [[funType]]$funType:: Function type, e.g. non-deterministic or aggregate. [[graph]]$graph:: The name of a graph, for example, `myGraph`. [[graphTypeDependence]]$graphTypeDependence:: Graph type dependencency for constraint, one of `UNDESIGNATED`, `INDEPENDENT`, or `DEPENDENT`. -[[graphTypeElement]]$graphTypeElement:: An element of a graph type, for example `(:Node => { name :: STRING})`, or `(:Source)-[:REL =>]->(:Target)`. +[[graphTypeElement]]$graphTypeElement:: An element of a graph type, for example `(:Node => { name :: STRING})`, or `(:Source)-[:REL =>]->(:Target)`. [[graphTypeReference]]$graphTypeReference:: Graph type reference, for example, `(:Node =>)` or `p`. [[graphTypeOperation]]$graphTypeOperation:: Graph type operation, for example, one of `SET`, `ADD`, `DROP` or `ALTER`. [[hint]]$hint:: Freeform description of a hint, for example, `USING INDEX n:N(prop)`. [[hintList]]$hintList:: A list of free form descriptions of hints like `USING INDEX n:N(prop)`. +[[ident]]$ident:: A generic identifier, for example `my_identifier`. [[idx]]$idx:: Index name, `my_index`. //Change $idx to $idxName [[idxDescr]]$idxDescr:: Index description, for example, `INDEX :Person(name)`.