From 3312210d4dd64a8d01c5e6dc6612aeca1d757f47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jens=20Pryce-=C3=85klundh?= <112686610+JPryce-Aklundh@users.noreply.github.com> Date: Wed, 18 Jun 2025 09:17:55 +0200 Subject: [PATCH 01/21] fix Cypher 25 queries (#1309) --- .../ROOT/images/repeatable-elements-graph.svg | 132 +++++++++--------- modules/ROOT/pages/clauses/use.adoc | 4 +- modules/ROOT/pages/patterns/match-modes.adoc | 11 +- .../composed-queries/sequential-queries.adoc | 2 +- 4 files changed, 76 insertions(+), 73 deletions(-) diff --git a/modules/ROOT/images/repeatable-elements-graph.svg b/modules/ROOT/images/repeatable-elements-graph.svg index f85e06d7f..f3f02d4fb 100644 --- a/modules/ROOT/images/repeatable-elements-graph.svg +++ b/modules/ROOT/images/repeatable-elements-graph.svg @@ -1,48 +1,44 @@ - - + + + + - - - - + - - + + - - - - + + - - - - + + + + - - + @@ -50,16 +46,15 @@ - - - - - - - + + + + + + + - - + @@ -67,17 +62,16 @@ - - - + + + - - - - + + + + - - + @@ -85,14 +79,13 @@ - - - - + + + + - - - + + @@ -100,17 +93,15 @@ - - - + + - - - + + - + - + @@ -119,17 +110,15 @@ - - - - - + + + - + - + - + @@ -139,10 +128,10 @@ - + - + @@ -152,7 +141,16 @@ - + + + + + + + + + + @@ -172,10 +170,16 @@ - - + + + + + + + + diff --git a/modules/ROOT/pages/clauses/use.adoc b/modules/ROOT/pages/clauses/use.adoc index 68799cdfd..69d43792d 100644 --- a/modules/ROOT/pages/clauses/use.adoc +++ b/modules/ROOT/pages/clauses/use.adoc @@ -73,8 +73,8 @@ In subqueries, a `USE` clause may appear directly following the xref:subqueries/ [source, cypher, role=test-setup] ---- CREATE DATABASE myDatabase; -CREATE COMPOSITE DATABASE `myComposite`; -CREATE ALIAS `myComposite`.`myConstituent` FOR DATABASE `myDatabase`; +CREATE COMPOSITE DATABASE myComposite; +CREATE ALIAS myComposite.myConstituent FOR DATABASE myDatabase; ---- //// diff --git a/modules/ROOT/pages/patterns/match-modes.adoc b/modules/ROOT/pages/patterns/match-modes.adoc index 0385bd384..29b283bc6 100644 --- a/modules/ROOT/pages/patterns/match-modes.adoc +++ b/modules/ROOT/pages/patterns/match-modes.adoc @@ -181,11 +181,10 @@ The next example matches paths starting and ending at the same `Location` (`Knei ---- MATCH REPEATABLE ELEMENTS p = (start:Location {name: 'Kneiphof'})-[:BRIDGE]-{,9}(start) // <1> WHERE all(bridge IN range(1,7) WHERE bridge IN [r IN relationships(p) | r.id]) // <2> -WITH p -ORDER BY length(p) -LIMIT 1 RETURN [n IN nodes(p) | n.name] AS visitedLocations, [r IN relationships(p) | r.id] AS crossedBridges +ORDER BY length(p), crossedBridges +LIMIT 1 ---- <1> Paths with a length of less than 9 relationships return no results because they do not allow enough moves to traverse all seven bridges at least once while forming a cycle back to Kneiphof. @@ -196,13 +195,13 @@ RETURN [n IN nodes(p) | n.name] AS visitedLocations, |=== | visitedLocations | crossedBridges -| ["Kneiphof", "South Bank", "Kneiphof", "South Bank", "Lomse", "Kneiphof", "North Bank", "Lomse", "North Bank", "Kneiphof"] -| [4, 6, 4, 3, 7, 5, 2, 2, 1] +| ["Kneiphof", "North Bank", "Kneiphof", "South Bank", "Lomse", "North Bank", "Kneiphof", "South Bank", "Lomse", "Kneiphof"] +| [1, 1, 4, 3, 2, 5, 6, 3, 7] 2+d|Rows: 1 |=== -The order of the bridges traversed in the path returned demonstrates that bridges `2` and `4` were crossed twice in order to return to `Kneiphof`. +The order of the bridges traversed in the path returned demonstrates that bridges `1` and `3` were crossed twice in order to return to `Kneiphof`. image::repeatable-elements-graph.svg[Several graphs showing order of traversals when using repeatable elements match mode, width=600, role=popup] _Sequence of bridge traversals when using `REPEATABLE ELEMENTS`._ diff --git a/modules/ROOT/pages/queries/composed-queries/sequential-queries.adoc b/modules/ROOT/pages/queries/composed-queries/sequential-queries.adoc index 6a0f33ca0..72f714b05 100644 --- a/modules/ROOT/pages/queries/composed-queries/sequential-queries.adoc +++ b/modules/ROOT/pages/queries/composed-queries/sequential-queries.adoc @@ -65,7 +65,7 @@ CREATE (techCorp:Supplier {name: 'TechCorp', email: 'contact@techcorp.com'}), == Syntax .`NEXT` syntax -[source, cypher] +[source, syntax] ---- From afc06db43aacfbbf3ac69cd3117adecf195a3da0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jens=20Pryce-=C3=85klundh?= <112686610+JPryce-Aklundh@users.noreply.github.com> Date: Wed, 18 Jun 2025 12:57:22 +0200 Subject: [PATCH 02/21] add xrefs for constraints index page (#1311) --- modules/ROOT/pages/constraints/index.adoc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/ROOT/pages/constraints/index.adoc b/modules/ROOT/pages/constraints/index.adoc index f906e317b..5ae7f1828 100644 --- a/modules/ROOT/pages/constraints/index.adoc +++ b/modules/ROOT/pages/constraints/index.adoc @@ -5,10 +5,10 @@ include::https://raw.githubusercontent.com/neo4j-graphacademy/courses/main/ascii Neo4j offers several constraints to ensure the quality and integrity of data in a graph. The following constraints are available in Neo4j: -* *Property uniqueness constraints* ensure that the combined property values are unique for all nodes with a specific label or all relationships with a specific type. -* *Property existence constraints* ensure that a property exists either for all nodes with a specific label or for all relationships with a specific type. label:enterprise-edition[] -* *Property type constraints* ensure that a property has the required property type for all nodes with a specific label or for all relationships with a specific type. label:enterprise-edition[] -* *Key constraints* ensure that all properties exist and that the combined property values are unique for all nodes with a specific label or all relationships with a specific type.label:enterprise-edition[] +* xref:constraints/managing-constraints.adoc#create-property-uniqueness-constraints[Property uniqueness constraints]: ensure that the combined property values are unique for all nodes with a specific label or all relationships with a specific type. +* xref:constraints/managing-constraints.adoc#create-property-existence-constraints[Property existence constraints]: ensure that a property exists either for all nodes with a specific label or for all relationships with a specific type. label:enterprise-edition[] +* xref:constraints/managing-constraints.adoc#create-property-type-constraints[Property type constraints]: ensure that a property has the required property type for all nodes with a specific label or for all relationships with a specific type. label:enterprise-edition[] +* xref:constraints/managing-constraints.adoc#create-key-constraints[Key constraints]: ensure that all properties exist and that the combined property values are unique for all nodes with a specific label or all relationships with a specific type.label:enterprise-edition[] To learn more about creating, listing, and dropping these constraints, as well as information about index-backed constraints, constraint creation failures and data violation scenarios, and more, see xref:constraints/managing-constraints.adoc[]. From 00efee7b6051ca9f41ef73f7036cbc485c8ee961 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jens=20Pryce-=C3=85klundh?= <112686610+JPryce-Aklundh@users.noreply.github.com> Date: Wed, 18 Jun 2025 13:39:40 +0200 Subject: [PATCH 03/21] match modes and NEXT cheat sheet tags (#1310) Co-authored-by: Richard Sill <156673635+rsill-neo4j@users.noreply.github.com> --- modules/ROOT/pages/patterns/match-modes.adoc | 4 ++++ .../queries/composed-queries/sequential-queries.adoc | 9 +++++++++ 2 files changed, 13 insertions(+) diff --git a/modules/ROOT/pages/patterns/match-modes.adoc b/modules/ROOT/pages/patterns/match-modes.adoc index 29b283bc6..57b941c34 100644 --- a/modules/ROOT/pages/patterns/match-modes.adoc +++ b/modules/ROOT/pages/patterns/match-modes.adoc @@ -115,11 +115,13 @@ _In the `samplePath` with a length of `6` returned by `DIFFERENT RELATIONSHIPS`, However, if the relationship count is increased to `7`, `0` paths are returned. .Find paths with a length of 7 relationships +// tag::patterns_match_modes_different_relationships[] [source, cypher] ---- MATCH p = (:Location {name: 'Kneiphof'})--{7}() RETURN count(p) AS pathCount ---- +// end::patterns_match_modes_different_relationships[] .Result [role="queryresult",options="header,footer",cols="1*(p:Product {name: 'Chocolate'}) @@ -119,6 +120,7 @@ NEXT RETURN customer.firstName AS chocolateCustomer, product.price * (1 - customer.discount) AS chocolatePrice ---- +// end::sequential_queries_basic_example[] .Result [role="queryresult",options="header,footer",cols="2*(:Product)<-[:SUPPLIES]-(s:Supplier) @@ -227,6 +233,7 @@ WHEN size(personalities) > 1 THEN ELSE RETURN customer, personalities[0] AS personality ---- +// end::sequential_queries_chaining_conditional_queries[] .Result [role="queryresult",options="header,footer",cols="2*(p:Product) @@ -273,6 +281,7 @@ ELSE { RETURN customer.firstName AS customer, "club below 1000" AS customerType, finalSum AS sum } ---- +// end::sequential_queries_in_conditional_queries[] .Result [role="queryresult",options="header,footer",cols="3* Date: Wed, 18 Jun 2025 14:46:46 +0200 Subject: [PATCH 04/21] List removed, deprecated, new options of the CREATE db cmd (#1312) Co-authored-by: Reneta Popova --- ...ions-additions-removals-compatibility.adoc | 50 +++++++++++++++++++ package-lock.json | 4 +- 2 files changed, 52 insertions(+), 2 deletions(-) diff --git a/modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc b/modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc index 576efb774..59798c060 100644 --- a/modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc +++ b/modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc @@ -30,6 +30,27 @@ Features removed in Cypher 25 are still available on Neo4j 2025.06+ databases ei | Feature | Details +a| +label:functionality[] +label:removed[] +[source, cypher, role="noheader"] +---- +CREATE DATABASE db OPTIONS { seedCredentials: ... } +---- +| The option `seedCredentials` is removed from the `CREATE DATABASE` `OPTIONS` map. +For more information, see link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/standard-databases/create-databases/#manage-databases-create-database-options[Operations Manual -> Database administration -> Create databases]. + +a| +label:functionality[] +label:removed[] +[source, cypher, role="noheader"] +---- +CREATE DATABASE db OPTIONS { existingDataSeedInstance: ... } +---- +| The option `existingDataSeedInstance` is removed from the `CREATE DATABASE` `OPTIONS` map and replaced by `existingDataSeedServer`. +For more information, see link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/standard-databases/create-databases/#manage-databases-create-database-options[Operations Manual -> Database administration -> Create databases]. + + a| label:functionality[] label:removed[] @@ -138,6 +159,25 @@ For more information, see the link:{neo4j-docs-base-uri}/operations-manual/curre |=== +=== Deprecated in Cypher 25 + +[cols="2", options="header"] +|=== +| Feature +| Details + +a| +label:functionality[] +label:deprecated[] +[source, cypher, role="noheader"] +---- +CREATE DATABASE db OPTIONS { existingData: ... } +---- +| The option `existingData` is deprecated. +For more information, see link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/standard-databases/create-databases/#manage-databases-create-database-options[Operations Manual -> Database administration -> Create databases]. + +|=== + === Updated in Cypher 25 @@ -360,6 +400,16 @@ CREATE DATABASE db OPTIONS { seedRestoreUntil: ... } This allows a database to be seeded up to a specific date or transaction ID. For more information, see link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/standard-databases/seed-from-uri/[Operations Manual -> Database administration -> Create a database from a URI]. +a| +label:functionality[] +label:new[] +[source, cypher, role="noheader"] +---- +CREATE DATABASE db OPTIONS { seedSourceDatabase: ... } +---- +| You can specify the name of a source database if the `seedURI` points to a folder containing backups for multiple databases. +For more information, see link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/standard-databases/create-databases/#manage-databases-create-database-options[Operations Manual -> Database administration -> Create databases]. + a| label:functionality[] label:new[] diff --git a/package-lock.json b/package-lock.json index e2fe81617..9d9055cee 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "cypher-manual", - "version": "5.0.0", + "version": "25", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "cypher-manual", - "version": "5.0.0", + "version": "25", "license": "ISC", "dependencies": { "@antora/cli": "^3.1.9", From 7134e4b446739f591a73618fdebd74f76866fd6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jens=20Pryce-=C3=85klundh?= <112686610+JPryce-Aklundh@users.noreply.github.com> Date: Thu, 19 Jun 2025 14:05:24 +0200 Subject: [PATCH 05/21] Add missing Cypher 25 updates (GQL extended identifiers + subqeury expression change) (#1313) --- .../pages/appendix/gql-conformance/index.adoc | 2 +- .../gql-conformance/supported-mandatory.adoc | 4 +- ...ions-additions-removals-compatibility.adoc | 66 ++++++++++++++----- modules/ROOT/pages/syntax/parameters.adoc | 4 +- 4 files changed, 53 insertions(+), 23 deletions(-) diff --git a/modules/ROOT/pages/appendix/gql-conformance/index.adoc b/modules/ROOT/pages/appendix/gql-conformance/index.adoc index b269905ad..718d85745 100644 --- a/modules/ROOT/pages/appendix/gql-conformance/index.adoc +++ b/modules/ROOT/pages/appendix/gql-conformance/index.adoc @@ -1,7 +1,7 @@ :description: Overview of Cypher's conformance to GQL. = GQL conformance -*Last updated*: 2 June 2025 + +*Last updated*: 18 June 2025 + *Neo4j version*: 2025.06 GQL is the new link:https://www.iso.org/home.html[ISO] International Standard query language for graph databases. diff --git a/modules/ROOT/pages/appendix/gql-conformance/supported-mandatory.adoc b/modules/ROOT/pages/appendix/gql-conformance/supported-mandatory.adoc index 12bfb44a1..f76c5ca04 100644 --- a/modules/ROOT/pages/appendix/gql-conformance/supported-mandatory.adoc +++ b/modules/ROOT/pages/appendix/gql-conformance/supported-mandatory.adoc @@ -211,10 +211,8 @@ In Cypher, `trim()` removes any whitespace character. | 21.1 | Names and variables | xref:syntax/index.adoc[] -| Cypher supports GQL’s lexical elements, with the following caveats: +| Cypher supports GQL’s lexical elements, with the following caveat: -* GQL allows for extended parameter identifiers. -For example: `RETURN $0hello` is allowed in GQL but not Cypher. * GQL allows identifiers that are not variables to be delimited with both backticks and quotes. Cypher only allows backticks. For example: `MATCH (n) RETURN n."a prop"` is allowed in GQL but not Cypher. diff --git a/modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc b/modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc index 59798c060..61354701b 100644 --- a/modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc +++ b/modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc @@ -59,10 +59,10 @@ label:removed[] RETURN 1 as my\u0085identifier ---- a| -The Unicode character \`\u0085` has been removed for unescaped identifiers and is now considered a whitespace character. -To continue using it, escape the identifier by adding backticks around it. +The Unicode character `\u0085` (`Next Line`) has been removed for unescaped identifiers and is now considered a whitespace character. +To continue using it, escape the identifier by adding backticks (++``++) around it. This applies to all unescaped identifiers in Cypher, such as label expressions, properties, variable names, or parameters. -In the given example, the quoted identifier would be \`my�identifier`. +In the given example, the quoted identifier would be `my\u0085identifier`. a| label:functionality[] @@ -72,23 +72,24 @@ label:removed[] RETURN 1 as my$Identifier ---- a| -The character with the Unicode representation \`\u0024` has been removed for unescaped identifiers. To continue using it, escape the identifier by adding backticks around the identifier. -This applies to all unescaped identifiers in Cypher, such as label expressions, properties, variable names, or parameters. In the given example, the quoted identifier would be \`my$identifier`. +The character with the Unicode representation `\u0024` (`$`) has been removed for unescaped identifiers. +To continue using it, escape the identifier by adding backticks (++``++) around the identifier. +This applies to all unescaped identifiers in Cypher, such as label expressions, properties, variable names, or parameters. In the given example, the quoted identifier would be `my\u0024identifier`. The following Unicode Characters are removed in identifiers: -'\u0000', '\u0001', '\u0002', '\u0003', '\u0004', '\u0005', '\u0006', '\u0007', -'\u0008', '\u000E', '\u000F', '\u0010', '\u0011', '\u0012', '\u0013', '\u0014', -'\u0015', '\u0016', '\u0017', '\u0018', '\u0019', '\u001A', '\u001B', '\u007F', -'\u0080', '\u0081', '\u0082', '\u0083', '\u0084', '\u0086', '\u0087', '\u0088', -'\u0089', '\u008A', '\u008B', '\u008C', '\u008D', '\u008E', '\u008F', '\u0090', -'\u0091', '\u0092', '\u0093', '\u0094', '\u0095', '\u0096', '\u0097', '\u0098', -'\u0099', '\u009A', '\u009B', '\u009C', '\u009D', '\u009E', '\u009F', '\u0024', -'\u00A2', '\u00A3', '\u00A4', '\u00A5', '\u00AD', '\u0600', '\u0601', '\u0602', -'\u0603', '\u0604', '\u0605', '\u061C', '\u06DD', '\u070F', '\u08E2', '\u180E', -'\u200B', '\u200C', '\u200D', '\u200E', '\u200F', '\u202A', '\u202B', '\u202C', -'\u202D', '\u202E', '\u2060', '\u2061', '\u2062', '\u2063', '\u2064', '\u2066', -'\u2067', '\u2068', '\u2069', '\u206A', '\u206B', '\u206C', '\u206D', '\u206E', -'\u206F', '\u2E2F', '\uFEFF', '\uFFF9', '\uFFFA', '\uFFFB' +`\u0000`, `\u0001`, `\u0002`, `\u0003`, `\u0004`, `\u0005`, `\u0006`, `\u0007`, +`\u0008`, `\u000E`, `\u000F`, `\u0010`, `\u0011`, `\u0012`, `\u0013`, `\u0014`, +`\u0015`, `\u0016`, `\u0017`, `\u0018`, `\u0019`, `\u001A`, `\u001B`, `\u007F`, +`\u0080`, `\u0081`, `\u0082`, `\u0083`, `\u0084`, `\u0086`, `\u0087`, `\u0088`, +`\u0089`, `\u008A`, `\u008B`, `\u008C`, `\u008D`, `\u008E`, `\u008F`, `\u0090`, +`\u0091`, `\u0092`, `\u0093`, `\u0094`, `\u0095`, `\u0096`, `\u0097`, `\u0098`, +`\u0099`, `\u009A`, `\u009B`, `\u009C`, `\u009D`, `\u009E`, `\u009F`, `\u0024`, +`\u00A2`, `\u00A3`, `\u00A4`, `\u00A5`, `\u00AD`, `\u0600`, `\u0601`, `\u0602`, +`\u0603`, `\u0604`, `\u0605`, `\u061C`, `\u06DD`, `\u070F`, `\u08E2`, `\u180E`, +`\u200B`, `\u200C`, `\u200D`, `\u200E`, `\u200F`, `\u202A`, `\u202B`, `\u202C`, +`\u202D`, `\u202E`, `\u2060`, `\u2061`, `\u2062`, `\u2063`, `\u2064`, `\u2066`, +`\u2067`, `\u2068`, `\u2069`, `\u206A`, `\u206B`, `\u206C`, `\u206D`, `\u206E`, +`\u206F`, `\u2E2F`, `\uFEFF`, `\uFFF9`, `\uFFFA`, `\uFFFB` a| label:functionality[] @@ -186,6 +187,35 @@ For more information, see link:{neo4j-docs-base-uri}/operations-manual/current/d | Feature | Details +a| +label:functionality[] +label:updated[] +[source, cypher, role="noheader"] +---- +WITH 1 AS g +RETURN COLLECT { + UNWIND [1,2,3] AS x + WITH * WHERE x < 0 + WITH count(*) AS agg + RETURN agg + g +} AS x +---- + +a| Imported variables are now correctly handled as constants inside xref:subqueries/collect.adoc[`COLLECT`], xref:subqueries/count.adoc[`COUNT`], and xref:subqueries/existential.adoc[`EXISTS`] subquery expressions. +The example query previously returned no results (`[]`) because the imported variable was used incorrectly as an implicit grouping key. +It now returns `[1]`, since the variable is not used as a grouping key, allowing `count(*)` to return `0` and `0 + g` to evaluate to `1`. + +a| +label:functionality[] +label:updated[] +[source, cypher, role="noheader"] +---- +RETURN $0hello +---- + +a| Parameters can start with extended identifier characters (such as numbers), in line with the xref:appendix/gql-conformance/index.adoc[GQL] standard. +For more information, see xref:syntax/parameters.adoc[]. + a| label:functionality[] label:updated[] diff --git a/modules/ROOT/pages/syntax/parameters.adoc b/modules/ROOT/pages/syntax/parameters.adoc index 2ffe9de69..1820abd17 100644 --- a/modules/ROOT/pages/syntax/parameters.adoc +++ b/modules/ROOT/pages/syntax/parameters.adoc @@ -26,7 +26,9 @@ Parameters cannot be used for the following constructs, as these form part of th * Relationship types; `MATCH (n)-[:$param]->(m)` is invalid. * Node labels; `MATCH (n:$param)` is invalid. -Parameters may consist of letters and numbers, and any combination of these, but cannot start with a number or a currency symbol. +Parameter names can start with and contain underscores, letters, numbers, and combining marks such as accents (e.g., `é`). +Currency symbols (e.g., `$` and `€`), non-printable Unicode control characters that only affect formatting (e.g., `\t` for Tab), punctuation (e.g., `!`), and whitespaces are not allowed in any position of a parameter name. +For example, `$héllo`, `$0param`, and `$_param` are valid, while `$€value`, `$hello!`, and `$bad param` are not. Setting parameters when running a query is dependent on the client environment. For example: From e131a9450a2b3893e7bccd4e8a34bb3a6cf29f4b Mon Sep 17 00:00:00 2001 From: Neil Dewhurst Date: Mon, 23 Jun 2025 19:52:08 +0100 Subject: [PATCH 06/21] Mark 25 as prerelease - force sitemap to Cypher 5 (#1316) Marking 25 as prerelease will do the following: - Ensure the sitemaps extension treats Cypher 5 as the latest version, so that it will generate a sitemap from Cypher 5 content - Ensure canonical URLs in the HTML `` are accurate. We can then allow new pages in Cypher 25 to be indexed, or we can index the whole of the Cypher manual. --- antora.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/antora.yml b/antora.yml index c0f178920..63677c6f2 100644 --- a/antora.yml +++ b/antora.yml @@ -1,6 +1,7 @@ name: cypher-manual title: Cypher Manual version: '25' +prerelease: true start_page: ROOT:introduction/index.adoc nav: - modules/ROOT/content-nav.adoc From 883e522d8f1c1ec871813934fa4ada17e58ccdf1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jens=20Pryce-=C3=85klundh?= <112686610+JPryce-Aklundh@users.noreply.github.com> Date: Mon, 23 Jun 2025 21:21:56 +0200 Subject: [PATCH 07/21] Select Cypher version (#1123) Operations manual PRs mentioned in this PR: - https://github.com/neo4j/docs-operations/pull/2153 - https://github.com/neo4j/docs-operations/pull/2116 TODO: Add clarifying note on Additions page --------- Co-authored-by: Stefano Ottolenghi --- modules/ROOT/content-nav.adoc | 1 + ...ions-additions-removals-compatibility.adoc | 3 +- modules/ROOT/pages/queries/index.adoc | 5 +- .../ROOT/pages/queries/select-version.adoc | 243 ++++++++++++++++++ 4 files changed, 249 insertions(+), 3 deletions(-) create mode 100644 modules/ROOT/pages/queries/select-version.adoc diff --git a/modules/ROOT/content-nav.adoc b/modules/ROOT/content-nav.adoc index 61edc54f4..c58e92758 100644 --- a/modules/ROOT/content-nav.adoc +++ b/modules/ROOT/content-nav.adoc @@ -6,6 +6,7 @@ * xref:queries/index.adoc[] ** xref:queries/concepts.adoc[] ** xref:queries/basic.adoc[] +** xref:queries/select-version.adoc[] ** xref:queries/composed-queries/index.adoc[] *** xref:queries/composed-queries/combined-queries.adoc[] *** xref:queries/composed-queries/conditional-queries.adoc[] diff --git a/modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc b/modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc index 61354701b..5715f481c 100644 --- a/modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc +++ b/modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc @@ -1,5 +1,5 @@ [[cypher-deprecations-additions-removals-compatibility]] -= Deprecations, additions, and compatibility += Additions, deprecations, removals, and compatibility :description: all of the features that have been removed, deprecated, added, or extended in different Cypher versions. :test-skip: true // all deprecations would fail. @@ -20,6 +20,7 @@ Replacement syntax for deprecated and removed features are also indicated. [IMPORTANT] Cypher 25 was introduced in Neo4j 2025.06 and can only be used on Neo4j 2025.06+ databases. Features removed in Cypher 25 are still available on Neo4j 2025.06+ databases either by prepending a query with `CYPHER 5` or by having Cypher 5 as the default language for the database. +For more information, see xref:queries/select-version.adoc[]. [[cypher-deprecations-additions-removals-2025.06]] == Neo4j 2025.06 diff --git a/modules/ROOT/pages/queries/index.adoc b/modules/ROOT/pages/queries/index.adoc index 063e5f050..f0917ffdf 100644 --- a/modules/ROOT/pages/queries/index.adoc +++ b/modules/ROOT/pages/queries/index.adoc @@ -1,11 +1,12 @@ = Queries :description: This page is an overview of the queries section in the Cypher Manual. -This section provides a brief overview of the core concepts of a Cypher query (nodes, relationships, and paths), and examples of how to query a Neo4j graph database. -It also discusses how to compose combined queries using `UNION`, conditional queries using `WHEN` and sequential queries using `NEXT`. +This section provides a brief overview of the core concepts of a Cypher query (nodes, relationships, and paths), along with examples of how to query a Neo4j graph database. +It also explains how to select the version of Cypher in which queries are run, and how to compose combined queries using `UNION`, conditional queries using `WHEN`, and sequential queries using `NEXT`. * xref:queries/concepts.adoc[] * xref:queries/basic.adoc[] +* xref:queries/select-version.adoc[] * xref:queries/composed-queries/index.adoc[] ** xref:queries/composed-queries/combined-queries.adoc[] ** xref:queries/composed-queries/conditional-queries.adoc[] label:new[Introduced in Neo4j 2025.06] diff --git a/modules/ROOT/pages/queries/select-version.adoc b/modules/ROOT/pages/queries/select-version.adoc new file mode 100644 index 000000000..e21b9102f --- /dev/null +++ b/modules/ROOT/pages/queries/select-version.adoc @@ -0,0 +1,243 @@ +:description: Information about how to select Cypher version for queries or databases. + += Select Cypher version + +Users can specify the version of Cypher in which they want to run their queries, choosing between Cypher 5 and Cypher 25. +The Cypher version can be specified either by configuring a default language for the database or by setting it on a per-query basis. + +[[cypher-versions-explained]] +== Cypher 25, Cypher 5, and Neo4j explained + +Starting in 2025, the Neo4j server transitioned to a calendar-based versioning system. +This means Neo4j will no longer use its previous semantic versioning and release pattern (e.g., 5.25, 5.26). +Instead, releases from 2025 onwards will follow a *YYYY.MM* format, beginning with version 2025.01 released in January 2025, followed by 2025.02 released in February 2025, and so on. + +Cypher 25 is introduced alongside *Neo4j 2025.06*. +It is created as a clone of Cypher 5, but with additional new and updated features, as well as some removed features. +For more information about the new, updated, and removed features included in Cypher 25, see the xref:deprecations-additions-removals-compatibility.adoc#cypher-deprecations-additions-removals-2025.06[Additions, deprecations, removals, and compatibility] page. + +Cypher 25 is in an evolving state, and more features will be added to it with future releases of Neo4j. +In the releases following Neo4j 2026.06, features will only be added to Cypher 25; no features will be removed until the next Cypher release. +*Any new Cypher features introduced in Neo4j 2025.06 or later will be exclusively added to Cypher 25.* + +Users running Neo4j version 2025.06 or later can choose to run their queries using the previous version of Cypher: Cypher 5. +If so, Neo4j will use Cypher 5 as it existed at the time of the Neo4j 2025.06 release (the release in which Cypher 5 was frozen). +*No new features will be added to Cypher 5* (only performance enhancements and eventual bug fixes may be included in server releases following Neo4j 2025.06). +Cypher 5 users must, therefore, migrate to Cypher 25 in order to access new features. +For information about Cypher 5, see the link:https://neo4j.com/docs/cypher-manual/5/introduction/[Cypher 5 Manual]. + +[NOTE] +Although Cypher 5 queries are currently supported on Neo4j 2025.06+ databases, they will eventually need to be migrated to Cypher 25, as support for Cypher 5 will be discontinued in a future release (anticipated no earlier than two additional server LTS cycles). + +[[select-default-cypher-version]] +== Select the default Cypher version for a database + +Databases created on, or migrated to, Neo4j 2025.06 or later will continue to have Cypher 5 as their default language (unless {neo4j-docs-base-uri}/operations-manual/current/configuration/configuration-settings/#config_db.query.default_language[`db.query.default_language`] is set to `CYPHER_25`). +This is true for link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/#manage-database-systems[system, standard, and composite] Neo4j databases. +However, it is possible to set a different default language on both new and existing system, standard, and composite databases. + +To select a default Cypher version when creating a database, add `DEFAULT LANGUAGE ` to the link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/standard-databases/create-databases/[`CREATE DATABASE`] statement. + +[NOTE] +Setting the default language requires the link:{neo4j-docs-base-uri}/operations-manual/current/authentication-authorization/dbms-administration/#access-control-dbms-administration-database-management[`SET DATABASE DEFAULT LANGUAGE` privilege]. + +.Select default Cypher version when creating a database +[.tabbed-example] +===== +[.include-with-Cypher-25] +====== + +.Cypher 25 +[source,cypher] +---- +CREATE DATABASE actors DEFAULT LANGUAGE CYPHER 25 +---- + +====== + +[.include-with-Cypher-5] +====== + +.Cypher 5 +[source,cypher] +---- +CREATE DATABASE movies DEFAULT LANGUAGE CYPHER 5 +---- + +====== +===== + +To alter the default Cypher version on an existing database, add `SET DEFAULT LANGUAGE ` to the link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/standard-databases/alter-databases/[`ALTER DATABASE`] command. + +[NOTE] +Altering the default language requires the link:{neo4j-docs-base-uri}/operations-manual/current/authentication-authorization/dbms-administration/#access-control-dbms-administration-database-management[`SET DATABASE DEFAULT LANGUAGE` privilege]. + +.Alter the default Cypher version on an existing database +[.tabbed-example] +===== +[.include-with-Cypher-25] +====== + +.Cypher 25 +[source,cypher] +---- +ALTER DATABASE movies SET DEFAULT LANGUAGE CYPHER 25 +---- + +====== + +[.include-with-Cypher-5] +====== + +.Cypher 5 +[source,cypher] +---- +ALTER DATABASE actors SET DEFAULT LANGUAGE CYPHER 5 +---- + +====== +===== + +Selecting `CYPHER 25` ensures that all queries run on that database will be executed using the language as it exists in the version of Neo4j that the database is currently running, provided it is on Neo4j 2025.06 or later (unless a query is prepended with xref:selection-query-cypher-version[`CYPHER 5`], which overrides this default). + +Selecting `CYPHER 5` as the default database language ensures that all queries run on that database uses the language as it existed at the time of the Neo4j 2025.06 release (unless a query is prepended with xref:selection-query-cypher-version[`CYPHER 25`], which overrides this default). +Any changes introduced after the 2025.06 release will not affect the semantics of the query. + +[[config-database-upgrades]] +== Cypher versions, configuration settings, and DBMS upgrades + +Changing the Cypher version of new databases in a DBMS can also be done with the setting link:{neo4j-docs-base-uri}/operations-manual/current/configuration/configuration-settings/#config_db.query.default_language[`db.query.default_language`] (default value: `CYPHER_5`). +This setting determines the default language for new databases where it has not been specified as part of a `CREATE` or `ALTER` database command. +For example, `config_db.query.default_language=CYPHER_25` will set Cypher 25 as the default language for a DBMS. +For more information about using configuration settings, see the link:{neo4j-docs-base-uri}/operations-manual/current/configuration/[Operations Manual -> Configuration]. + +The table below outlines which Cypher version is assigned to databases in different upgrade or installation scenarios: + +[cols="3", options="header"] +|=== +| Scenario | `db.query.default_language` | Databases + + +| *Standard DBMS upgrade to Neo4j 2025.06+* +| Unset +| *Existing system database:* `CYPHER 5` + +*Existing user databases:* `CYPHER 5` + +*New user databases default:* `CYPHER 5` + + +| *Custom DBMS upgrade to Neo4j 2025.06+* +| Manually set to `CYPHER_25` by administrator +| *Existing system database:* `CYPHER 5` + +*Existing user databases:* `CYPHER 5` + +*New user databases default:* `CYPHER 25` + + +| *New installation of Neo4j 2025.06+* +| Set to `CYPHER_5` +| *New system database:* `CYPHER 5` + +*New user databases default:* `CYPHER 5` + + +|=== + +For more information about upgrading and migrating Neo4j databases, see the link:{neo4j-docs-base-uri}/upgrade-migration-guide/current/[Upgrade and migration guide]. + +[[migrate-queries-from-5-to-25]] +== Migrating queries from Cypher 5 to Cypher 25 + +It is recommended to modify queries that depend on features deprecated in Cypher 5 and removed in Cypher 25 to align with the changes introduced in Cypher 25. + +For example, Cypher 25 disallowed using a `NODE` or `RELATIONSHIP` instead of a `MAP` on the RHS of a xref:clauses/set.adoc[`SET`] clause, and instead requires the xref:functions/scalar.adoc#functions-properties[`properties()`] function to get the map of properties from nodes or relationships before referencing them in a `SET` clause. +The following example demonstrates how a query that works in Cypher 5 can be rewritten to work in Cypher 25. + +.Original Cypher 5 query +[source, cypher, role=test-skip] +---- +MATCH (n:Order)-[r:SHIPPED_TO]->(:Address) +SET n = r +---- + +.Modified Cypher 25 query +[source, cypher] +---- +MATCH (n:Order)-[r:SHIPPED_TO]->(:Address) +SET n = properties(r) +---- + +Another option is to prepend individual queries with a specific language version. + +[[selection-query-cypher-version]] +== Select Cypher version for individual queries + +To select the Cypher version of a query, prepend it with `CYPHER `. +This selection will override the default language for the database the query is executed against, and allows you to either work with Cypher 25 features in a database that has Cypher 5 as the default language, or to continue running your Cypher 5 queries on a database that has Cypher 25 as the default language. + +Queries run with Cypher 5 will eventually need to be updated to Cypher 25 as support for Cypher 5 will be discontinued in the future (anticipated no earlier than two additional server LTS cycles). +It is, therefore, recommended to set the default language to Cypher 25 and migrate the necessary queries to its supported syntax rather than prepending individual queries with a Cypher version. + +.Select the Cypher version for a query +[.tabbed-example] +===== +[.include-with-Cypher-25] +====== + +.Cypher 25 query on a Neo4j 2025.06+ database with Cypher 5 as default language +[source,cypher] +---- +CYPHER 25 +MATCH (n:Order)-[r:SHIPPED_TO]->(:Address) +SET n = properties(r) +---- + +====== + +[.include-with-Cypher-5] +====== + +.Cypher 5 query on a Neo4j 2025.06+ database with Cypher 25 as default language +[source,cypher] +---- +CYPHER 5 +MATCH (n:Order)-[r:SHIPPED_TO]->(:Address) +SET n = r +---- + +====== +===== + +Selecting `CYPHER 25` ensures that the query will be executed using the language as it exists in the version of Neo4j that the database is currently running, provided it is on Neo4j 2025.06 or later. + +Selecting `CYPHER 5` ensures that the query will be executed using the language as it existed at the time of the Neo4j 2025.06 release. +Any changes introduced after the 2025.06 release will not affect the query. + +[[procedures-and-functions]] +=== Procedures and functions + +link:{neo4j-docs-base-uri}/operations-manual/current/procedures[Procedures] and xref:functions/index.adoc[functions] (including built-in and link:{neo4j-docs-base-uri}/apoc/current/[APOC]) are tied to a specific Cypher language version. +Therefore, procedures and functions in Neo4j 2025.06+ and APOC 2025.06+ (both of which have Cypher 5 as their default language) may behave differently depending on what version of Cypher is used. + +For example, APOC 2025.06 removed Cypher 25 support of the procedure `apoc.create.uuids()`, meaning it is not available to queries running Cypher 25. +However, it can still be used on APOC 2025.06 if queries are prepended with `CYPHER 5`, or if the database’s default version is set to `CYPHER 5`. +In this case, Neo4j will use APOC and Cypher 5 as they existed at the time of the 2025.06 release. + +.Using a procedure removed in Cypher 25 with APOC 2025.06+ +[source, cypher] +---- +CYPHER 5 +CALL apoc.create.uuids(10) +---- + +[[cypher-selection-with-other-query-options]] +=== Combine Cypher version selection with other query options + +It is possible to combine Cypher version selection with other xref:planning-and-tuning/query-tuning.adoc[query options]. +The below example selects both the version and the xref:planning-and-tuning/runtimes/concepts.adoc[runtime] of Cypher for the same query: + +.Combining Cypher version selection with other query options +[source, cypher] +---- +CYPHER 5 runtime=parallel +MATCH (n:Person) +RETURN n.name +---- + From 9685a572e549d9776c8eb6942e8040b816527c17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jens=20Pryce-=C3=85klundh?= <112686610+JPryce-Aklundh@users.noreply.github.com> Date: Tue, 24 Jun 2025 10:07:52 +0200 Subject: [PATCH 08/21] introduction note about Cypher 25 (#1320) --- modules/ROOT/pages/introduction/index.adoc | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/modules/ROOT/pages/introduction/index.adoc b/modules/ROOT/pages/introduction/index.adoc index 01fef1f03..db46e6935 100644 --- a/modules/ROOT/pages/introduction/index.adoc +++ b/modules/ROOT/pages/introduction/index.adoc @@ -7,11 +7,17 @@ ifndef::backend-pdf[] :description: This section provides an introduction to the Cypher query language. endif::[] -Welcome to the Neo4j Cypher Manual. +Welcome to the Neo4j Cypher Manual. -Cypher is Neo4j’s declarative query language, allowing users to unlock the full potential of property graph databases. +Cypher is Neo4j’s declarative query language, allowing users to unlock the full potential of property graph databases. -The Cypher Manual aims to be as instructive as possible to readers from a variety of backgrounds and professions, such as developers, administrators, and academic researchers. +[NOTE] +This manual covers Cypher 25. +As of Neo4j 2025.06, all new Cypher features are exclusively added to Cypher 25, while Cypher 5 is frozen. +For information about how to how to use Cypher 25, see xref:queries/select-version.adoc[]. +For information about new features added to Cypher 25, see xref:deprecations-additions-removals-compatibility.adoc[]. + +The Cypher Manual aims to be as instructive as possible to readers from a variety of backgrounds and professions, such as developers, administrators, and academic researchers. If you are new to Cypher and Neo4j, you can visit the link:{neo4j-docs-base-uri}/getting-started/current/cypher-intro/[Getting Started Guide -> Introduction to Cypher] chapter. Additionally, https://graphacademy.neo4j.com/[Neo4j GraphAcademy] has a variety of free courses tailored for all levels of experience. From 12eff22fd71dd54d14d846e7eda53d347abced16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nadja=20M=C3=BCller?= <73830555+nadja-muller@users.noreply.github.com> Date: Tue, 24 Jun 2025 12:30:53 +0200 Subject: [PATCH 09/21] update removals & deprecations for graph references (#1315) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit see also: https://github.com/neo4j/docs-status-codes/pull/340 --------- Co-authored-by: Jens Pryce-Åklundh <112686610+JPryce-Aklundh@users.noreply.github.com> --- ...ions-additions-removals-compatibility.adoc | 42 +++++++++++++++---- 1 file changed, 34 insertions(+), 8 deletions(-) diff --git a/modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc b/modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc index 5715f481c..ba704be56 100644 --- a/modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc +++ b/modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc @@ -51,6 +51,20 @@ CREATE DATABASE db OPTIONS { existingDataSeedInstance: ... } | The option `existingDataSeedInstance` is removed from the `CREATE DATABASE` `OPTIONS` map and replaced by `existingDataSeedServer`. For more information, see link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/standard-databases/create-databases/#manage-databases-create-database-options[Operations Manual -> Database administration -> Create databases]. +a| +[#_graph_reference_removed_name_parts_quoting] +label:functionality[] +label:removed[] +[source, cypher, role=noheader] +---- +CREATE ALIAS composite.`1` FOR DATABASE neo4j +---- +[source, cypher, role=noheader] +---- +USE composite.`1` +---- +| Graph references with separately backticked name parts have been removed. Use parameters or backtick the entire name, e.g. `USE `composite.1`` + a| label:functionality[] @@ -278,6 +292,7 @@ Several xref:clauses/transaction-clauses.adoc#query-listing-transactions[`SHOW * The current query-related columns — `currentQuery`, `currentQueryId`, `parameters`, `planner`, `runtime`, `indexes`, `currentQueryStartTime`, `currentQueryElapsedTime`, `currentQueryCpuTime`, `currentQueryIdleTime`, and `currentQueryStatus` — now return `null` when no query is executing. a| +[#_graph_reference_updated_graph_by_name_quotes] label:functionality[] label:updated[] [source, cypher, role="noheader"] @@ -732,9 +747,16 @@ label:deprecated[] USE my.db ... ---- -| In xref:clauses/use.adoc[`USE`] clauses, databases and aliases with unquoted `.` are deprecated unless the `.` is used to indicate that the database or alias belongs to a composite database. -Names containing `.` should be quoted using backticks. -For example, `USE `my.db`` is valid. +a| The use of unquoted `.` characters in xref:clauses/use.adoc[`USE`] clauses when specifying databases and aliases was deprecated in 5.26, except when `.` indicated that the database or alias belonged to a composite database. +However, this deprecation was withdrawn in Neo4j 2025.06, and replaced by the following updates in Cypher 25: + +* xref::deprecations-additions-removals-compatibility.adoc#_graph_reference_removed_name_parts_quoting[Removed support for quoted name parts in graph references] + +* xref::deprecations-additions-removals-compatibility.adoc#_graph_reference_updated_graph_by_name_quotes[Update to graph functions] + +This is because the previous quoting rules were inconsistent and ambiguous. +The rules are clarified and improved in Cypher 25. +For more information, see xref::values-and-types/graph-references.adoc#rules[Graph reference rules] |=== @@ -3353,12 +3375,16 @@ label:deprecated[] CREATE DATABASE databaseName.withDot ... ---- a| -Creating a database with dots in the name has been deprecated, instead quote the database name using backticks: +Creating a database with . characters was deprecated in 5.0. +However, this deprecation was withdrawn in 2025.06, and replaced by the following updates in Cypher 25: -[source, cypher, role="noheader"] ----- -CREATE DATABASE `databaseName.withDot` ... ----- +* xref::deprecations-additions-removals-compatibility.adoc#_graph_reference_removed_name_parts_quoting[Removed support for quoted name parts in graph references] + +* xref::deprecations-additions-removals-compatibility.adoc#_graph_reference_updated_graph_by_name_quotes[Update to graph functions] + +This is because the previous quoting rules were inconsistent and ambiguous. +The rules are clarified and improved in Cypher 25. +For more information, see xref::values-and-types/graph-references.adoc#rules[Graph reference rules] a| [[cypher-5_0-d_4]] From 86417ed41adb57609195e241bc6a78944685f23e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jens=20Pryce-=C3=85klundh?= <112686610+JPryce-Aklundh@users.noreply.github.com> Date: Tue, 24 Jun 2025 14:07:30 +0200 Subject: [PATCH 10/21] fix link --- modules/ROOT/pages/queries/select-version.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ROOT/pages/queries/select-version.adoc b/modules/ROOT/pages/queries/select-version.adoc index e21b9102f..36dc28eb0 100644 --- a/modules/ROOT/pages/queries/select-version.adoc +++ b/modules/ROOT/pages/queries/select-version.adoc @@ -32,7 +32,7 @@ Although Cypher 5 queries are currently supported on Neo4j 2025.06+ databases, t [[select-default-cypher-version]] == Select the default Cypher version for a database -Databases created on, or migrated to, Neo4j 2025.06 or later will continue to have Cypher 5 as their default language (unless {neo4j-docs-base-uri}/operations-manual/current/configuration/configuration-settings/#config_db.query.default_language[`db.query.default_language`] is set to `CYPHER_25`). +Databases created on, or migrated to, Neo4j 2025.06 or later will continue to have Cypher 5 as their default language (unless link:{neo4j-docs-base-uri}/operations-manual/current/configuration/configuration-settings/#config_db.query.default_language[`db.query.default_language`] is set to `CYPHER_25`). This is true for link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/#manage-database-systems[system, standard, and composite] Neo4j databases. However, it is possible to set a different default language on both new and existing system, standard, and composite databases. From fe02df9e055f075322dca909d281dbeb649ce40f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jens=20Pryce-=C3=85klundh?= <112686610+JPryce-Aklundh@users.noreply.github.com> Date: Tue, 24 Jun 2025 16:06:12 +0200 Subject: [PATCH 11/21] conditional query graph (#1322) --- .../ROOT/images/conditional-query-graph.svg | 27 +++++++++++++++++++ .../ROOT/images/conditional_query_graph.svg | 1 - .../composed-queries/conditional-queries.adoc | 2 +- 3 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 modules/ROOT/images/conditional-query-graph.svg delete mode 100644 modules/ROOT/images/conditional_query_graph.svg diff --git a/modules/ROOT/images/conditional-query-graph.svg b/modules/ROOT/images/conditional-query-graph.svg new file mode 100644 index 000000000..ad6012dc5 --- /dev/null +++ b/modules/ROOT/images/conditional-query-graph.svg @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/modules/ROOT/images/conditional_query_graph.svg b/modules/ROOT/images/conditional_query_graph.svg deleted file mode 100644 index 4e3d7b1a0..000000000 --- a/modules/ROOT/images/conditional_query_graph.svg +++ /dev/null @@ -1 +0,0 @@ -WORKS_FORWORKS_FORWORKS_FORLOVESLOVESPersonname:'Alice'age:65Personname:'Bob'age:25Personname:'Charlie'age:61Personname:'Daniel'age:39Personname:'Eskil'age:39 \ No newline at end of file diff --git a/modules/ROOT/pages/queries/composed-queries/conditional-queries.adoc b/modules/ROOT/pages/queries/composed-queries/conditional-queries.adoc index ad42adf29..02cada893 100644 --- a/modules/ROOT/pages/queries/composed-queries/conditional-queries.adoc +++ b/modules/ROOT/pages/queries/composed-queries/conditional-queries.adoc @@ -13,7 +13,7 @@ For information about using `WHEN` branches in expressions, see xref:expressions The following graph is used for the examples below: -image::conditional_query_graph.svg[width="700",role="middle"] +image::conditional-query-graph.svg[Example graph with persons connected by works for and loves relationships, width=600,role=popup] To recreate the graph, run the following query against an empty Neo4j database: From ac31278b6db5eef25ea70a06877b3900a3ae4491 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jens=20Pryce-=C3=85klundh?= <112686610+JPryce-Aklundh@users.noreply.github.com> Date: Wed, 25 Jun 2025 09:27:36 +0200 Subject: [PATCH 12/21] add cypher-5 to pr checks (#1324) --- .github/workflows/docs-pr-checks.yml | 5 +---- .github/workflows/docs-teardown.yml | 5 ++--- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/.github/workflows/docs-pr-checks.yml b/.github/workflows/docs-pr-checks.yml index 0776f03d1..a3cd44cc8 100644 --- a/.github/workflows/docs-pr-checks.yml +++ b/.github/workflows/docs-pr-checks.yml @@ -6,10 +6,7 @@ on: branches: - "dev" - "cypher-25" - - "5.x" - - "4.[0-9]" - - "3.5" - + - "cypher-5" jobs: diff --git a/.github/workflows/docs-teardown.yml b/.github/workflows/docs-teardown.yml index 3434992ef..936c829a3 100644 --- a/.github/workflows/docs-teardown.yml +++ b/.github/workflows/docs-teardown.yml @@ -6,9 +6,8 @@ on: branches: - "dev" - "cypher-25" - - "5.x" - - "4.[0-9]" - - "3.5" + - "cypher-5" + types: - closed From cf4f25e1b4a095cee1248acd00b59b6ef298e0d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jens=20Pryce-=C3=85klundh?= <112686610+JPryce-Aklundh@users.noreply.github.com> Date: Fri, 27 Jun 2025 08:43:47 +0200 Subject: [PATCH 13/21] Add language version control commands to Additions page (#1314) This should be added to the Cypher 5 page as well (as new to Cypher 5). --------- Co-authored-by: Therese Magnusson --- ...ions-additions-removals-compatibility.adoc | 106 ++++++++++++++++++ 1 file changed, 106 insertions(+) diff --git a/modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc b/modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc index ba704be56..675025fe5 100644 --- a/modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc +++ b/modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc @@ -341,6 +341,112 @@ a| label:functionality[] label:new[] +[source, cypher, role="noheader"] +---- +CREATE [COMPOSITE] DATABASE actors SET DEFAULT LANGUAGE CYPHER 25 +---- + +a| Set the default Cypher version for a standard or composite database when creating it. +The available versions are `CYPHER 25` and `CYPHER 5`. +If not specified, the default language for the database is set to the default language of the DBMS. +For more information, see the following sections in the Operations Manual: + +* link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/standard-databases/create-databases/#_set_a_default_cypher_version_for_a_standard_database[Set a default Cypher version for a standard database]. +* link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/composite-databases/create-composite-databases/#composite-databases-default-language[Set the default Cypher version for a composite database]. + +a| +label:functionality[] +label:new[] + +[source, cypher, role="noheader"] +---- +CREATE ALIAS `remote-with-default-language` +FOR DATABASE `northwind-graph-2020` + AT "neo4j+s://location:7687" + USER alice + PASSWORD 'example_secret' + DEFAULT LANGUAGE CYPHER 25 +---- + +a| Set the default Cypher version for a remote database alias when creating it. +The available versions are `CYPHER 5` and `CYPHER 25`. +Local database aliases and database aliases in composite databases cannot be assigned a default Cypher version. +Local database aliases always have the Cypher version of their target database and database aliases in composite databases always have the Cypher version of the composite database they belong to. +For more information, see the link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/aliases/manage-aliases-standard-databases/#_set_a_default_cypher_version_for_remote_database_aliases[Operations Manual -> Set a default Cypher version for remote database aliases]. + +a| +label:functionality[] +label:new[] +[source, cypher, role="noheader"] +---- +ALTER DATABASE movies SET DEFAULT LANGUAGE CYPHER 25 +---- + +a| Alter the default Cypher version of an existing standard or composite database. +The available versions are `CYPHER 25` and `CYPHER 5`. +For more information, see the link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/standard-databases/alter-databases/#alter-database-default-language[Operations Manual -> Alter the default Cypher version of an existing database]. + +a| +label:functionality[] +label:new[] + +[source, cypher, role="noheader"] +---- +ALTER ALIAS `remote-with-default-language` SET DATABASE DEFAULT LANGUAGE CYPHER 25 +---- + +a| Alter the default Cypher version of a remote database alias. +The available versions are `CYPHER 25` and `CYPHER 5`. +It is not possible to alter the default Cypher version of a local database alias or an alias belonging to a composite database. +Local database aliases always have the Cypher version of their target database and aliases belonging to composite databases always have the Cypher version of the composite database. +For more information, see the link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/aliases/manage-aliases-standard-databases/#alter-default-language-remote-database-alias[Operations Manual -> Alter the default Cypher version of a remote database alias]. + +a| +label:functionality[] +label:new[] + +[source, cypher, role="noheader"] +---- +SHOW DATABASES YIELD name, defaultLanguage +---- + +a| The new return column `defaultLanguage` for the `SHOW DATABASE` command returns the default language of a database. +This column is not returned by default; it can only be returned using `YIELD`. +For more information, see the link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/standard-databases/listing-databases/#_show_the_default_cypher_version_of_a_database[Operations Manual -> Show the default Cypher version of a database]. + +a| +label:functionality[] +label:new[] + +[source, cypher, role="noheader"] +---- +SHOW ALIAS `remote-with-default-language` FOR DATABASE YIELD name, defaultLanguage +---- + +a| The new return column `defaultLanguage` for the `SHOW ALIAS` command returns the default language of a database alias. +This column is not returned by default; it can only be returned using `YIELD`. +For more information, see the link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/aliases/manage-aliases-standard-databases/#manage-aliases-list[Operations Manual -> List database aliases]. + +a| +label:functionality[] +label:new[] + +[source, cypher, role="noheader"] +---- +CYPHER 25 +MATCH (n:Person) +FILTER n.age < 35 +RETURN n.name AS name +---- + +a| New query option: `CYPHER 25`. +Prepending a query with `CYPHER 25` ensures that a query is run with Cypher 25, regardless of the default language of a database. +(The ability to select `CYPHER 5` was introduced in Neo4j 5.21). + +a| +label:functionality[] +label:new[] + [source, cypher, role="noheader"] ---- RETURN 1 AS a From d890303d09964f2f0863e7aaae52fc84918b9e25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jens=20Pryce-=C3=85klundh?= <112686610+JPryce-Aklundh@users.noreply.github.com> Date: Fri, 27 Jun 2025 10:21:11 +0200 Subject: [PATCH 14/21] Add cheat sheet tags for language version options (#1330) --- modules/ROOT/pages/queries/select-version.adoc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/ROOT/pages/queries/select-version.adoc b/modules/ROOT/pages/queries/select-version.adoc index 36dc28eb0..f418409cb 100644 --- a/modules/ROOT/pages/queries/select-version.adoc +++ b/modules/ROOT/pages/queries/select-version.adoc @@ -182,12 +182,14 @@ It is, therefore, recommended to set the default language to Cypher 25 and migra ====== .Cypher 25 query on a Neo4j 2025.06+ database with Cypher 5 as default language +// tag::queries_select_version_cypher_25[] [source,cypher] ---- CYPHER 25 MATCH (n:Order)-[r:SHIPPED_TO]->(:Address) SET n = properties(r) ---- +// end::queries_select_version_cypher_25[] ====== @@ -195,19 +197,21 @@ SET n = properties(r) ====== .Cypher 5 query on a Neo4j 2025.06+ database with Cypher 25 as default language +// tag::queries_select_version_cypher_5[] [source,cypher] ---- CYPHER 5 MATCH (n:Order)-[r:SHIPPED_TO]->(:Address) SET n = r ---- +// end::queries_select_version_cypher_5[] ====== ===== -Selecting `CYPHER 25` ensures that the query will be executed using the language as it exists in the version of Neo4j that the database is currently running, provided it is on Neo4j 2025.06 or later. +Selecting `CYPHER 25` ensures that the query will be executed using Cypher 25 as it exists in the version of Neo4j that the database is currently running, provided it is on Neo4j 2025.06 or later. -Selecting `CYPHER 5` ensures that the query will be executed using the language as it existed at the time of the Neo4j 2025.06 release. +Selecting `CYPHER 5` ensures that the query will be executed using Cypher 5 as it existed at the time of the Neo4j 2025.06 release. Any changes introduced after the 2025.06 release will not affect the query. [[procedures-and-functions]] From c8c66be8a56e4f8f92f81839b98aee8677fab222 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jens=20Pryce-=C3=85klundh?= <112686610+JPryce-Aklundh@users.noreply.github.com> Date: Fri, 27 Jun 2025 11:24:38 +0200 Subject: [PATCH 15/21] minor fix to select version (#1331) --- modules/ROOT/pages/queries/index.adoc | 2 +- modules/ROOT/pages/queries/select-version.adoc | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/ROOT/pages/queries/index.adoc b/modules/ROOT/pages/queries/index.adoc index f0917ffdf..85d6c36c5 100644 --- a/modules/ROOT/pages/queries/index.adoc +++ b/modules/ROOT/pages/queries/index.adoc @@ -6,7 +6,7 @@ It also explains how to select the version of Cypher in which queries are run, a * xref:queries/concepts.adoc[] * xref:queries/basic.adoc[] -* xref:queries/select-version.adoc[] +* xref:queries/select-version.adoc[] label:new[Introduced in Neo4j 2025.06] * xref:queries/composed-queries/index.adoc[] ** xref:queries/composed-queries/combined-queries.adoc[] ** xref:queries/composed-queries/conditional-queries.adoc[] label:new[Introduced in Neo4j 2025.06] diff --git a/modules/ROOT/pages/queries/select-version.adoc b/modules/ROOT/pages/queries/select-version.adoc index f418409cb..a4472e655 100644 --- a/modules/ROOT/pages/queries/select-version.adoc +++ b/modules/ROOT/pages/queries/select-version.adoc @@ -1,4 +1,5 @@ :description: Information about how to select Cypher version for queries or databases. +:page-role: new-2025.06 = Select Cypher version @@ -98,9 +99,9 @@ ALTER DATABASE actors SET DEFAULT LANGUAGE CYPHER 5 ====== ===== -Selecting `CYPHER 25` ensures that all queries run on that database will be executed using the language as it exists in the version of Neo4j that the database is currently running, provided it is on Neo4j 2025.06 or later (unless a query is prepended with xref:selection-query-cypher-version[`CYPHER 5`], which overrides this default). +Selecting `CYPHER 25` ensures that all queries run on that database will be executed using Cypher 25 as it exists in the version of Neo4j that the database is currently running, provided it is on Neo4j 2025.06 or later (unless a query is prepended with xref:selection-query-cypher-version[`CYPHER 5`], which overrides this default). -Selecting `CYPHER 5` as the default database language ensures that all queries run on that database uses the language as it existed at the time of the Neo4j 2025.06 release (unless a query is prepended with xref:selection-query-cypher-version[`CYPHER 25`], which overrides this default). +Selecting `CYPHER 5` as the default database language ensures that all queries run on that database uses Cypher 5 as it existed at the time of the Neo4j 2025.06 release (unless a query is prepended with xref:selection-query-cypher-version[`CYPHER 25`], which overrides this default). Any changes introduced after the 2025.06 release will not affect the semantics of the query. [[config-database-upgrades]] From d6300597d5f62b59e1cd32f1de171ec64bc86da5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jens=20Pryce-=C3=85klundh?= <112686610+JPryce-Aklundh@users.noreply.github.com> Date: Fri, 27 Jun 2025 13:59:04 +0200 Subject: [PATCH 16/21] Fix last remaining broken links (#1332) --- .../pages/appendix/gql-conformance/supported-optional.adoc | 2 +- .../expressions/predicates/type-predicate-expressions.adoc | 4 ++-- modules/ROOT/pages/patterns/match-modes.adoc | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/ROOT/pages/appendix/gql-conformance/supported-optional.adoc b/modules/ROOT/pages/appendix/gql-conformance/supported-optional.adoc index 7d915ee08..6039fc510 100644 --- a/modules/ROOT/pages/appendix/gql-conformance/supported-optional.adoc +++ b/modules/ROOT/pages/appendix/gql-conformance/supported-optional.adoc @@ -106,7 +106,7 @@ These codes order the features in the table below. | GD01 | Updatable graphs -| xref:clauses/clause-composition.adoc#writing-clauses[Cypher clauses -> Writing clauses] +| xref:clauses/index.adoc#writing-clauses[Cypher clauses -> Writing clauses] | * Feature GD01 implies compliance with GQL feature GT01, "Explicit transaction commands", which states that conforming languages shall contain the following transaction control commands: `START TRANSACTION`, `ROLLBACK`, and `COMMIT`. These are not present in Cypher. However, Neo4j offers transaction management through the link:{neo4j-docs-base-uri}/create-applications[driver] transaction API. diff --git a/modules/ROOT/pages/expressions/predicates/type-predicate-expressions.adoc b/modules/ROOT/pages/expressions/predicates/type-predicate-expressions.adoc index 90eaa9872..0e6691859 100644 --- a/modules/ROOT/pages/expressions/predicates/type-predicate-expressions.adoc +++ b/modules/ROOT/pages/expressions/predicates/type-predicate-expressions.adoc @@ -64,8 +64,8 @@ RETURN val, val IS NOT :: STRING AS notString |=== -[[type-predicate-NULL]] -== Type predicate expressions for NULL +[[type-predicate-null]] +== Type predicate expressions for null All Cypher types includes the `null` value. Type predicate expressions can be appended with `NOT NULL`. diff --git a/modules/ROOT/pages/patterns/match-modes.adoc b/modules/ROOT/pages/patterns/match-modes.adoc index 57b941c34..c59a8a885 100644 --- a/modules/ROOT/pages/patterns/match-modes.adoc +++ b/modules/ROOT/pages/patterns/match-modes.adoc @@ -95,7 +95,7 @@ RETURN pathCount, [r IN relationships(samplePath) | r.id] AS samplePathBridges ---- -<1> The xref:functions/list.adoc#functions-collect[`collect()`] function collects all paths and `[0]` takes the first entry as the `samplePath`. +<1> The xref:functions/aggregating.adoc#functions-collect[`collect()`] function collects all paths and `[0]` takes the first entry as the `samplePath`. .Result [role="queryresult",options="header,footer",cols="3* Date: Tue, 1 Jul 2025 15:34:49 +0200 Subject: [PATCH 17/21] Clause composition: Write-read conflicts (#1328) Extend clause composition docs to also include Write-Read conflicts instead of only Read-Write conflicts Co-authored-by: Richard Sill <156673635+rsill-neo4j@users.noreply.github.com> --- .../pages/clauses/clause-composition.adoc | 102 +++++++++++++++++- 1 file changed, 99 insertions(+), 3 deletions(-) diff --git a/modules/ROOT/pages/clauses/clause-composition.adoc b/modules/ROOT/pages/clauses/clause-composition.adoc index 23769cc64..a0e2287ab 100644 --- a/modules/ROOT/pages/clauses/clause-composition.adoc +++ b/modules/ROOT/pages/clauses/clause-composition.adoc @@ -129,7 +129,7 @@ In a Cypher query, read and write clauses can take turns. The most important aspect of read-write queries is that the state of the graph also changes between clauses. [IMPORTANT] -A clause can never observe writes made by a later clause. +A clause can never observe writes made by a later clause, and will observe all writes done by the previous clauses. As of Cypher 25, read and write clauses can be combined in any order. That is, a write clause followed by a read clause no longer requires a separating xref:clauses/with.adoc[`WITH`] clause in order for the read clause to observe the changes made by a preceding write clause. @@ -152,7 +152,7 @@ RETURN f.name AS friendName, .Table of intermediate results and state of the graph between read and write clauses ====== -Using the same example graph as above, this example shows the table of intermediate results and the state of the graph after each clause for the following query: +Using the same example graph as above, this example shows the table of intermediate results and the state of the graph after each clause for a query with a read clause before a write clause: [source,cypher, indent=0] ---- @@ -163,7 +163,7 @@ The query finds all nodes where the `name` property starts with "J" and for each such node it creates another node with the `name` property set to "Jay-jay". -.+The table of intermediate results and the state of the graph after each clause+ +.Read-write: The table of intermediate results and the state of the graph after each clause+ [options="header", width="100%", cols="3a, 4a, 4a"] |=== @@ -310,6 +310,102 @@ the graph made by the `CREATE`. ====== +.Table of intermediate results and state of the graph between write and read clauses +====== +On an empty graph, this example shows the table of intermediate results and the state of the graph after each clause for a query with a write clause before a read clause: + +[source,cypher, indent=0] +---- +UNWIND ["Max", "Lune"] AS dogName +CREATE (n:Dog {name: dogName}) +WITH n +MATCH (d:Dog) +RETURN COUNT(*) +---- +This query creates two `Dog` nodes and returns the value `4`. + +.+Write-read: The table of intermediate results and the state of the graph after each clause+ +[options="header", width="100%", cols="3a, 4a, 4a"] +|=== + +| Clause +| Table of intermediate results after the clause +| State of the graph after the clause, changes in red + +| ---- +UNWIND ["Max", "Luna"] AS dogName +---- +| +[options="header",cols="1m"] +!=== +! dogName +! "Max" +! "Luna" +!=== +| + +| ---- +CREATE (n:Dog {name: dogName}) +---- +| +[options="header",cols="1m, 1m"] +!=== +! dogName ! n +! "Max" ! (:Dog {name: 'Max'}) +! "Luna" ! (:Dog {name: 'Luna'}) +!=== +| + +[graphviz] +---- +digraph L { node [shape=record style=rounded]; +N5 [ +color = "red" +fontcolor = "red" +label = "{Dog\|name = \'Max\'\l}" +] +N6 [ +color = "red" +fontcolor = "red" +label = "{Dog\|name = \'Luna\'\l}" +] +} +---- + +| ---- +MATCH (d:Dog) +---- +| +[options="header",cols="1m, 1m, 1m"] +!=== +! dogName ! n ! d +! "Max" ! (:Dog {name: 'Max'}) ! (:Dog {name: 'Max'}) +! "Max" ! (:Dog {name: 'Max'}) ! (:Dog {name: 'Luna'}) +! "Luna" ! (:Dog {name: 'Luna'}) ! (:Dog {name: 'Max'}) +! "Luna" ! (:Dog {name: 'Luna'}) ! (:Dog {name: 'Luna'}) +!=== +| + +[graphviz] +---- +digraph L { node [shape=record style=rounded]; +N5 [ +label = "{Dog\|name = \'Max\'\l}" +] +N6 [ +label = "{Dog\|name = \'Luna\'\l}" +] +} +---- +|=== + +It is important to note that the `MATCH` clause reads all the `Dog` nodes that are created by the `CREATE` clause. +This is because the `CREATE` clause comes before the `MATCH` clause and thus the `MATCH` observes all changes to +the graph made by the `CREATE`. +The `MATCH` clause is performed for every intermediate result, this leads to finding two nodes for both intermediate results. + +====== + [[cypher-clause-composition-union-queries]] == Queries with `UNION` From 6f4aae65894cf02b871ff1ef4ab03f52bde493d2 Mon Sep 17 00:00:00 2001 From: Richard Sill Date: Tue, 1 Jul 2025 15:50:26 +0200 Subject: [PATCH 18/21] added equals rows around IMPORTANT admonition --- modules/ROOT/pages/clauses/clause-composition.adoc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/ROOT/pages/clauses/clause-composition.adoc b/modules/ROOT/pages/clauses/clause-composition.adoc index a0e2287ab..4ce2db52b 100644 --- a/modules/ROOT/pages/clauses/clause-composition.adoc +++ b/modules/ROOT/pages/clauses/clause-composition.adoc @@ -129,7 +129,9 @@ In a Cypher query, read and write clauses can take turns. The most important aspect of read-write queries is that the state of the graph also changes between clauses. [IMPORTANT] +==== A clause can never observe writes made by a later clause, and will observe all writes done by the previous clauses. +==== As of Cypher 25, read and write clauses can be combined in any order. That is, a write clause followed by a read clause no longer requires a separating xref:clauses/with.adoc[`WITH`] clause in order for the read clause to observe the changes made by a preceding write clause. From bae50e0da072ccb058cd9f6469d4fc917480fa57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jens=20Pryce-=C3=85klundh?= <112686610+JPryce-Aklundh@users.noreply.github.com> Date: Wed, 2 Jul 2025 11:45:23 +0200 Subject: [PATCH 19/21] Update Select Cypher versions guide with relevant links to Operations Manual and Upgrade and migration guide (#1327) Co-authored-by: Richard Sill <156673635+rsill-neo4j@users.noreply.github.com> Co-authored-by: Therese Magnusson --- .../ROOT/pages/queries/select-version.adoc | 58 +++++-------------- 1 file changed, 13 insertions(+), 45 deletions(-) diff --git a/modules/ROOT/pages/queries/select-version.adoc b/modules/ROOT/pages/queries/select-version.adoc index a4472e655..8f119aafd 100644 --- a/modules/ROOT/pages/queries/select-version.adoc +++ b/modules/ROOT/pages/queries/select-version.adoc @@ -39,9 +39,6 @@ However, it is possible to set a different default language on both new and exis To select a default Cypher version when creating a database, add `DEFAULT LANGUAGE ` to the link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/standard-databases/create-databases/[`CREATE DATABASE`] statement. -[NOTE] -Setting the default language requires the link:{neo4j-docs-base-uri}/operations-manual/current/authentication-authorization/dbms-administration/#access-control-dbms-administration-database-management[`SET DATABASE DEFAULT LANGUAGE` privilege]. - .Select default Cypher version when creating a database [.tabbed-example] ===== @@ -51,11 +48,10 @@ Setting the default language requires the link:{neo4j-docs-base-uri}/operations- .Cypher 25 [source,cypher] ---- -CREATE DATABASE actors DEFAULT LANGUAGE CYPHER 25 +CREATE DATABASE actors SET DEFAULT LANGUAGE CYPHER 25 ---- ====== - [.include-with-Cypher-5] ====== @@ -70,9 +66,6 @@ CREATE DATABASE movies DEFAULT LANGUAGE CYPHER 5 To alter the default Cypher version on an existing database, add `SET DEFAULT LANGUAGE ` to the link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/standard-databases/alter-databases/[`ALTER DATABASE`] command. -[NOTE] -Altering the default language requires the link:{neo4j-docs-base-uri}/operations-manual/current/authentication-authorization/dbms-administration/#access-control-dbms-administration-database-management[`SET DATABASE DEFAULT LANGUAGE` privilege]. - .Alter the default Cypher version on an existing database [.tabbed-example] ===== @@ -86,7 +79,6 @@ ALTER DATABASE movies SET DEFAULT LANGUAGE CYPHER 25 ---- ====== - [.include-with-Cypher-5] ====== @@ -104,44 +96,20 @@ Selecting `CYPHER 25` ensures that all queries run on that database will be exec Selecting `CYPHER 5` as the default database language ensures that all queries run on that database uses Cypher 5 as it existed at the time of the Neo4j 2025.06 release (unless a query is prepended with xref:selection-query-cypher-version[`CYPHER 25`], which overrides this default). Any changes introduced after the 2025.06 release will not affect the semantics of the query. -[[config-database-upgrades]] -== Cypher versions, configuration settings, and DBMS upgrades - -Changing the Cypher version of new databases in a DBMS can also be done with the setting link:{neo4j-docs-base-uri}/operations-manual/current/configuration/configuration-settings/#config_db.query.default_language[`db.query.default_language`] (default value: `CYPHER_5`). -This setting determines the default language for new databases where it has not been specified as part of a `CREATE` or `ALTER` database command. -For example, `config_db.query.default_language=CYPHER_25` will set Cypher 25 as the default language for a DBMS. -For more information about using configuration settings, see the link:{neo4j-docs-base-uri}/operations-manual/current/configuration/[Operations Manual -> Configuration]. - -The table below outlines which Cypher version is assigned to databases in different upgrade or installation scenarios: - -[cols="3", options="header"] -|=== -| Scenario | `db.query.default_language` | Databases - - -| *Standard DBMS upgrade to Neo4j 2025.06+* -| Unset -| *Existing system database:* `CYPHER 5` + -*Existing user databases:* `CYPHER 5` + -*New user databases default:* `CYPHER 5` - - -| *Custom DBMS upgrade to Neo4j 2025.06+* -| Manually set to `CYPHER_25` by administrator -| *Existing system database:* `CYPHER 5` + -*Existing user databases:* `CYPHER 5` + -*New user databases default:* `CYPHER 25` - - -| *New installation of Neo4j 2025.06+* -| Set to `CYPHER_5` -| *New system database:* `CYPHER 5` + -*New user databases default:* `CYPHER 5` - +For more information about how to change and view the default language of new and existing databases and remote database aliases, and the new privileges related to changing the default language, see the following links in the Operations Manual: -|=== +* link:{neo4j-docs-base-uri}/operations-manual/current/configuration/cypher-version-configuration/[Configure the Cypher default version] +* link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/standard-databases/create-databases/#_set_a_default_cypher_version_for_a_standard_database[Set a default Cypher version for a standard database] +* link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/composite-databases/create-composite-databases/#composite-databases-default-language[Set a default Cypher version for a composite database] +* link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/aliases/manage-aliases-standard-databases/#set-default-language-for-remote-database-aliases[Set a default Cypher version for remote database aliases] +* link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/standard-databases/alter-databases/#alter-database-default-language[Alter the default Cypher version of an existing database] +* link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/composite-databases/alter-composite-databases/#alter-default-language-composite-database[Alter the default Cypher version of a composite database] +* link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/aliases/manage-aliases-standard-databases/#alter-default-language-remote-database-alias[Alter the default Cypher version of a remote database alias] +* link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/standard-databases/listing-databases/#_show_the_default_cypher_version_of_a_database[Show the default Cypher version of a database] +* link:{neo4j-docs-base-uri}/operations-manual/authentication-authorization/dbms-administration/#_grant_privilege_to_modify_the_default_language_of_standard_databases[Grant privilege to modify the default language of standard databases] +* link:{neo4j-docs-base-uri}/operations-manual/authentication-authorization/dbms-administration/#grant-privilege-alter-composite-database[Grant privilege to modify composite databases] (required in order to alter the default language of a composite database) -For more information about upgrading and migrating Neo4j databases, see the link:{neo4j-docs-base-uri}/upgrade-migration-guide/current/[Upgrade and migration guide]. +For information about Cypher versions and DBMS upgrades, see the link:{neo4j-docs-base-uri}/upgrade-migration-guide/current/_cypher_versions[Upgrade and migration guide -> Cypher versions]. [[migrate-queries-from-5-to-25]] == Migrating queries from Cypher 5 to Cypher 25 From b9ee887008b152f566554ea2144713b924f9275c Mon Sep 17 00:00:00 2001 From: Stefano Ottolenghi Date: Fri, 4 Jul 2025 10:13:04 +0200 Subject: [PATCH 20/21] Update links with their redirects URLs. (#1334) --- .../appendix/gql-conformance/supported-optional.adoc | 2 +- .../appendix/gql-conformance/unsupported-mandatory.adoc | 2 +- modules/ROOT/pages/clauses/delete.adoc | 2 +- modules/ROOT/pages/clauses/load-csv.adoc | 8 ++++---- modules/ROOT/pages/functions/aggregating.adoc | 2 +- modules/ROOT/pages/functions/graph.adoc | 4 ++-- modules/ROOT/pages/genai-integrations.adoc | 6 +++--- .../indexes/search-performance-indexes/using-indexes.adoc | 2 +- .../pages/indexes/semantic-indexes/full-text-indexes.adoc | 2 +- .../pages/indexes/semantic-indexes/vector-indexes.adoc | 4 ++-- modules/ROOT/pages/introduction/cypher-aura.adoc | 4 ++-- modules/ROOT/pages/introduction/cypher-neo4j.adoc | 4 ++-- modules/ROOT/pages/introduction/cypher-overview.adoc | 2 +- .../ROOT/pages/planning-and-tuning/execution-plans.adoc | 4 ++-- .../pages/planning-and-tuning/runtimes/reference.adoc | 2 +- .../ROOT/pages/subqueries/subqueries-in-transactions.adoc | 2 +- modules/ROOT/pages/syntax/parameters.adoc | 2 +- modules/ROOT/pages/values-and-types/maps.adoc | 2 +- 18 files changed, 28 insertions(+), 28 deletions(-) diff --git a/modules/ROOT/pages/appendix/gql-conformance/supported-optional.adoc b/modules/ROOT/pages/appendix/gql-conformance/supported-optional.adoc index 6039fc510..df7568d2f 100644 --- a/modules/ROOT/pages/appendix/gql-conformance/supported-optional.adoc +++ b/modules/ROOT/pages/appendix/gql-conformance/supported-optional.adoc @@ -110,7 +110,7 @@ These codes order the features in the table below. | * Feature GD01 implies compliance with GQL feature GT01, "Explicit transaction commands", which states that conforming languages shall contain the following transaction control commands: `START TRANSACTION`, `ROLLBACK`, and `COMMIT`. These are not present in Cypher. However, Neo4j offers transaction management through the link:{neo4j-docs-base-uri}/create-applications[driver] transaction API. -Cypher Shell also offers specific link:{neo4j-docs-base-uri}/operations-manual/current/tools/cypher-shell/#cypher-shell-commands[commands] to manage transactions. +Cypher Shell also offers specific link:{neo4j-docs-base-uri}/operations-manual/current/cypher-shell/#cypher-shell-commands[commands] to manage transactions. * Feature GD01 implies conformance to GQL's `` (subclause 13.3). GQL’s `SET` has no order dependencies because all right-hand side operations are completed before any assignments occur. However, In Cypher’s `SET`, the order of rows can affect the outcome because changes made during execution may depend on the sequence of assignments. diff --git a/modules/ROOT/pages/appendix/gql-conformance/unsupported-mandatory.adoc b/modules/ROOT/pages/appendix/gql-conformance/unsupported-mandatory.adoc index 55cc050bf..4cf67734b 100644 --- a/modules/ROOT/pages/appendix/gql-conformance/unsupported-mandatory.adoc +++ b/modules/ROOT/pages/appendix/gql-conformance/unsupported-mandatory.adoc @@ -24,7 +24,7 @@ Neo4j offers session management through the link:{neo4j-docs-base-uri}/create-ap | GQL defines the following transaction commands: `START TRANSACTION`, `COMMIT`, and `ROLLBACK`. Neo4j offers transaction management through the link:{neo4j-docs-base-uri}/create-applications[driver] transaction API. -Cypher Shell also offers specific link:{neo4j-docs-base-uri}/operations-manual/current/tools/cypher-shell/#cypher-shell-commands[commands] to manage transactions. +Cypher Shell also offers specific link:{neo4j-docs-base-uri}/operations-manual/current/cypher-shell/#cypher-shell-commands[commands] to manage transactions. | 11.1 | Graph expressions diff --git a/modules/ROOT/pages/clauses/delete.adoc b/modules/ROOT/pages/clauses/delete.adoc index 948022d6c..11584513a 100644 --- a/modules/ROOT/pages/clauses/delete.adoc +++ b/modules/ROOT/pages/clauses/delete.adoc @@ -120,7 +120,7 @@ Deleted 1 node, deleted 1 relationship [NOTE] ==== The `DETACH DELETE` clause may not be permitted to users with restricted security privileges. -For more information, see link:{neo4j-docs-base-uri}/operations-manual/current/authentication-authorization/access-control#detach-delete-restricted-user[Operations Manual -> Fine-grained access control]. +For more information, see link:{neo4j-docs-base-uri}/operations-manual/current/tutorial/access-control/#detach-delete-restricted-user[Operations Manual -> Fine-grained access control]. ==== diff --git a/modules/ROOT/pages/clauses/load-csv.adoc b/modules/ROOT/pages/clauses/load-csv.adoc index fd2a0754a..0c48a2d2f 100644 --- a/modules/ROOT/pages/clauses/load-csv.adoc +++ b/modules/ROOT/pages/clauses/load-csv.adoc @@ -70,10 +70,10 @@ Added 4 nodes, Set 8 properties, Added 4 labels ==== [NOTE] -For ways of importing data into an Aura instance, see link:https://neo4j.com/docs/aura/auradb/importing/importing-data/[Aura -> Importing data]. +For ways of importing data into an Aura instance, see link:https://neo4j.com/docs/aura/classic/auradb/importing/importing-data/[Aura -> Importing data]. [TIP] -When using `+file:///+` URLs, spaces and other non-alphanumeric characters must be link:https://developer.mozilla.org/en-US/docs/Glossary/percent-encoding[URL-encoded]. +When using `+file:///+` URLs, spaces and other non-alphanumeric characters must be link:https://developer.mozilla.org/en-US/docs/Glossary/Percent-encoding[URL-encoded]. ==== Configuration settings for file URLs @@ -368,7 +368,7 @@ You can't load zipped CSV files from remote URLs. === Import data from relational databases If the source data comes from a relational model, it's worth evaluating how to gain the most from moving to a graph data model. -Before running the import, think about how the data can be modeled as a graph, and adapt its structure accordingly when running the import (see link:https://neo4j.com/docs/getting-started/data-modeling/guide-data-modeling/[Graph data modeling]). +Before running the import, think about how the data can be modeled as a graph, and adapt its structure accordingly when running the import (see link:https://neo4j.com/docs/getting-started/data-modeling/tutorial-data-modeling/[Graph data modeling]). Data from relational databases may consist of one or multiple CSV files, depending on the source database structure. A performant approach is to run multiple passes of `LOAD CSV` to import nodes separately from relationships. @@ -1166,7 +1166,7 @@ With increasing amounts of data, it is more efficient to create _all_ nodes firs There are a few other tools to get CSV data into Neo4j. -1. *The link:{neo4j-docs-base-uri}/operations-manual/current/tools/neo4j-admin/neo4j-admin-import/[`neo4j-admin database import`] command* is the most efficient way of importing large CSV files. +1. *The link:{neo4j-docs-base-uri}/operations-manual/current/import/[`neo4j-admin database import`] command* is the most efficient way of importing large CSV files. 2. Use a link:https://neo4j.com/docs/create-applications/[*language library*] to parse CSV data and run creation Cypher queries against a Neo4j database. Created as an extension library to provide common procedures and functions to developers. This library is especially helpful for complex transformations and data manipulations. diff --git a/modules/ROOT/pages/functions/aggregating.adoc b/modules/ROOT/pages/functions/aggregating.adoc index 58be16e53..db87890b0 100644 --- a/modules/ROOT/pages/functions/aggregating.adoc +++ b/modules/ROOT/pages/functions/aggregating.adoc @@ -10,7 +10,7 @@ Aggregation can be computed over all the matching paths, or it can be further di [TIP] ==== -To learn more about how Cypher handles aggregations performed on zero rows, refer to link:https://neo4j.com/developer/kb/understanding-aggregations-on-zero-rows//[Neo4j Knowledge Base -> Understanding aggregations on zero rows]. +To learn more about how Cypher handles aggregations performed on zero rows, refer to link:https://neo4j.com/developer/kb/understanding-aggregations-on-zero-rows/[Neo4j Knowledge Base -> Understanding aggregations on zero rows]. ==== == Example graph diff --git a/modules/ROOT/pages/functions/graph.adoc b/modules/ROOT/pages/functions/graph.adoc index 2bec760c9..c62c6a785 100644 --- a/modules/ROOT/pages/functions/graph.adoc +++ b/modules/ROOT/pages/functions/graph.adoc @@ -16,7 +16,7 @@ .Considerations |=== -| `graph.names()` is only supported on link:{neo4j-docs-base-uri}/operations-manual/current/composite-databases[composite databases]. +| `graph.names()` is only supported on link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/composite-databases/concepts/[composite databases]. |=== .+graph.names()+ @@ -71,7 +71,7 @@ The names of all graphs on the current composite database are returned. .Considerations |=== -| `graph.propertiesByName()` is only supported on link:{neo4j-docs-base-uri}/operations-manual/current/composite-databases[composite databases]. +| `graph.propertiesByName()` is only supported on link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/composite-databases/concepts/[composite databases]. | The properties in the returned `MAP` are set on the link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/aliases/manage-aliases-standard-databases/[alias]that adds the graph as a constituent of a composite database. |=== diff --git a/modules/ROOT/pages/genai-integrations.adoc b/modules/ROOT/pages/genai-integrations.adoc index 497931a3d..760954ba8 100644 --- a/modules/ROOT/pages/genai-integrations.adoc +++ b/modules/ROOT/pages/genai-integrations.adoc @@ -36,7 +36,7 @@ The graph contains 28863 nodes and 332522 relationships. There are 9083 `Movie` nodes with a `plot` and `title` property. To recreate the graph, download and import this link:https://github.com/neo4j-graph-examples/recommendations/raw/main/data/recommendations-embeddings-50.dump[dump file] to an empty Neo4j database. -Dump files can be imported for both link:{neo4j-docs-base-uri}/aura/auradb/importing/import-database/[Aura] and link:{neo4j-docs-base-uri}/operations-manual/current/backup-restore/restore-dump/[on-prem] instances. +Dump files can be imported for both link:{neo4j-docs-base-uri}/aura/classic/auradb/importing/import-database/[Aura] and link:{neo4j-docs-base-uri}/operations-manual/current/backup-restore/restore-dump/[on-prem] instances. [NOTE] The embeddings on this are generated using link:https://platform.openai.com/docs/guides/embeddings[OpenAI] (model `text-embedding-ada-002`), producing 1536-dimensional vectors. @@ -217,7 +217,7 @@ Each provider has its own configuration map that can be passed to `genai.vector. === Vertex AI * Identifier (`provider` argument): `"VertexAI"` -* https://cloud.google.com/vertex-ai/docs/generative-ai/embeddings/get-text-embeddings[Official Vertex AI documentation] +* https://cloud.google.com/vertex-ai/generative-ai/docs/embeddings/get-text-embeddings[Official Vertex AI documentation] .Vertex AI provider details [%collapsible] @@ -342,7 +342,7 @@ Supported values: + === Azure OpenAI * Identifier (`provider` argument): `"AzureOpenAI"` -* https://learn.microsoft.com/en-us/azure/ai-services/openai/[Official Azure OpenAI documentation] +* https://learn.microsoft.com/en-us/azure/ai-foundry/[Official Azure OpenAI documentation] [NOTE] Unlike the other providers, the model is configured when creating the deployment on Azure, and is thus not part of the configuration map. diff --git a/modules/ROOT/pages/indexes/search-performance-indexes/using-indexes.adoc b/modules/ROOT/pages/indexes/search-performance-indexes/using-indexes.adoc index 14608bcf8..347119a26 100644 --- a/modules/ROOT/pages/indexes/search-performance-indexes/using-indexes.adoc +++ b/modules/ROOT/pages/indexes/search-performance-indexes/using-indexes.adoc @@ -28,7 +28,7 @@ image::using-indexes-example-graph.svg[Graph showing two nodes being connected v In total, the graph contains 69165 nodes (of which 188 have the label `PointOfInterest`) and 152077 `ROUTE` relationships. To recreate the graph, download and import the link:https://github.com/neo4j-graph-examples/openstreetmap/raw/main/data/openstreetmap-50.dump[5.0 dump file] to an empty Neo4j database. -Dump files can be imported for both link:{neo4j-docs-base-uri}/aura/auradb/importing/import-database/[Aura] and link:{neo4j-docs-base-uri}/operations-manual/current/backup-restore/restore-dump/[on-prem] instances. +Dump files can be imported for both link:{neo4j-docs-base-uri}/aura/classic/auradb/importing/import-database/[Aura] and link:{neo4j-docs-base-uri}/operations-manual/current/backup-restore/restore-dump/[on-prem] instances. [[token-lookup-indexes]] == Token lookup indexes diff --git a/modules/ROOT/pages/indexes/semantic-indexes/full-text-indexes.adoc b/modules/ROOT/pages/indexes/semantic-indexes/full-text-indexes.adoc index 44bda16c4..06aba7874 100644 --- a/modules/ROOT/pages/indexes/semantic-indexes/full-text-indexes.adoc +++ b/modules/ROOT/pages/indexes/semantic-indexes/full-text-indexes.adoc @@ -390,7 +390,7 @@ The procedures for full-text indexes are listed in the table below: * Full-text indexes can be queried using the Lucene query language. * Full-text indexes are kept up to date automatically, as nodes and relationships are added, removed, and modified. * Full-text indexes will automatically populate newly created indexes with the existing data in a store. -* Full-text indexes can be checked by the link:{neo4j-docs-base-uri}/operations-manual/current/tools/neo4j-admin/consistency-checker[consistency checker], and they can be rebuilt if there is a problem with them. +* Full-text indexes can be checked by the link:{neo4j-docs-base-uri}/operations-manual/current/backup-restore/consistency-checker/[consistency checker], and they can be rebuilt if there is a problem with them. * Newly created full-text indexes get automatically populated with the existing data in the database. * Full-text indexes can support any number of properties in a single index. * Full-text indexes are created, dropped, and updated transactionally, and are automatically replicated throughout a cluster. diff --git a/modules/ROOT/pages/indexes/semantic-indexes/vector-indexes.adoc b/modules/ROOT/pages/indexes/semantic-indexes/vector-indexes.adoc index 06dd47696..82bc140d3 100644 --- a/modules/ROOT/pages/indexes/semantic-indexes/vector-indexes.adoc +++ b/modules/ROOT/pages/indexes/semantic-indexes/vector-indexes.adoc @@ -14,7 +14,7 @@ The following resources provide hands-on tutorials for working with LLMs and vec * link:https://neo4j.com/docs/genai/tutorials/embeddings-vector-indexes/[GenAI documentation -> Embeddings & Vector Indexes Tutorial] Neo4j vector indexes are powered by the link:https://lucene.apache.org/[Apache Lucene] indexing and search library.footnote:[Lucene implements a Hierarchical Navigable Small World (HNSW) Graph to perform a k approximate nearest neighbors (k-ANN) query over the vector fields. -For more information, see link:http://dx.doi.org/10.1109/TPAMI.2018.2889473[Efficient and Robust Approximate Nearest Neighbor Search Using Hierarchical Navigable Small World Graphs] -- Yury A. Malkov and Dmitry A. Yashunin] +For more information, see link:https://ieeexplore.ieee.org/document/8594636/[Efficient and Robust Approximate Nearest Neighbor Search Using Hierarchical Navigable Small World Graphs] -- Yury A. Malkov and Dmitry A. Yashunin] [[example-graph]] == Example graph @@ -27,7 +27,7 @@ image::vector-index-graph.svg[Graph example connecting movie to person nodes via The graph contains 28863 nodes and 332522 relationships. To recreate the graph, download and import this link:https://github.com/neo4j-graph-examples/recommendations/raw/main/data/recommendations-embeddings-50.dump[dump file] to an empty Neo4j database. -Dump files can be imported for both link:{neo4j-docs-base-uri}/aura/auradb/importing/import-database/[Aura] and link:{neo4j-docs-base-uri}/operations-manual/current/backup-restore/restore-dump/[on-prem] instances. +Dump files can be imported for both link:{neo4j-docs-base-uri}/aura/classic/auradb/importing/import-database/[Aura] and link:{neo4j-docs-base-uri}/operations-manual/current/backup-restore/restore-dump/[on-prem] instances. [NOTE] The dump file used to load the dataset contains embeddings generated by https://openai.com/[OpenAI], using the model `text-embedding-ada-002`. diff --git a/modules/ROOT/pages/introduction/cypher-aura.adoc b/modules/ROOT/pages/introduction/cypher-aura.adoc index 380ea527f..54e630c9c 100644 --- a/modules/ROOT/pages/introduction/cypher-aura.adoc +++ b/modules/ROOT/pages/introduction/cypher-aura.adoc @@ -17,7 +17,7 @@ AuraDB is available on the following tiers: * AuraDB Business Critical * AuraDB Virtual Dedicated Cloud -For more information, see link:{neo4j-docs-base-uri}/aura/auradb[Aura docs - Neo4j AuraDB overview]. +For more information, see link:{neo4j-docs-base-uri}/aura/classic/auradb/[Aura docs - Neo4j AuraDB overview]. AuraDS is available on the following tiers: @@ -26,7 +26,7 @@ AuraDS is available on the following tiers: * AuraDS Professional * AuraDS Enterprise -For more information, see link:{neo4j-docs-base-uri}/aura/aurads[Aura docs - Neo4j AuraDS overview]. +For more information, see link:{neo4j-docs-base-uri}/aura/classic/aurads/[Aura docs - Neo4j AuraDS overview]. == Using Cypher on Aura diff --git a/modules/ROOT/pages/introduction/cypher-neo4j.adoc b/modules/ROOT/pages/introduction/cypher-neo4j.adoc index cc87055ee..cbd2eea5f 100644 --- a/modules/ROOT/pages/introduction/cypher-neo4j.adoc +++ b/modules/ROOT/pages/introduction/cypher-neo4j.adoc @@ -55,7 +55,7 @@ Normally there is only one graph within each database, and many administrative c Cypher queries executed in a session may declare which graph they apply to, or use a default, given by the session. Composite databases can contain multiple graphs, by means of aliases to other databases. Queries submitted to composite databases may refer to multiple graphs within the same query. -For more information, see link:{neo4j-docs-base-uri}/operations-manual/current/composite-databases/[Operations manual -> Composite databases]. +For more information, see link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/composite-databases/concepts/[Operations manual -> Composite databases]. *Database*:: A database is a storage and retrieval mechanism for collecting data in a defined space on disk and in memory. @@ -121,7 +121,7 @@ For examples of the API, or the commands used to start and commit transactions, * For information on using transactions with a Neo4j driver, see _The session API_ in the link:{docs-base-uri}[Neo4j Driver manuals]. * For information on using transactions over the HTTP API, see the link:{neo4j-docs-base-uri}/http-api/current/transactions[HTTP API documentation -> Run transactions]. * For information on using transactions within the embedded Core API, see the link:{neo4j-docs-base-uri}/java-reference/current/java-embedded/cypher-java/[Java Reference -> Cypher queries]. -* For information on using transactions within the Neo4j Browser or Cypher-shell, see the link:{neo4j-docs-base-uri}/browser-manual/current/reference-commands/[Neo4j Browser documentation] or the link:{neo4j-docs-base-uri}/operations-manual/current/tools/cypher-shell/#cypher-shell-commands[Cypher-shell documentation]. +* For information on using transactions within the Neo4j Browser or Cypher-shell, see the link:{neo4j-docs-base-uri}/browser-manual/current/reference-commands/[Neo4j Browser documentation] or the link:{neo4j-docs-base-uri}/operations-manual/current/cypher-shell/#cypher-shell-commands[Cypher-shell documentation]. When writing procedures or using Neo4j embedded, remember that all iterators returned from an execution result should be either fully exhausted or closed. This ensures that the resources bound to them are properly released. diff --git a/modules/ROOT/pages/introduction/cypher-overview.adoc b/modules/ROOT/pages/introduction/cypher-overview.adoc index 6f4642b42..b4363f067 100644 --- a/modules/ROOT/pages/introduction/cypher-overview.adoc +++ b/modules/ROOT/pages/introduction/cypher-overview.adoc @@ -82,4 +82,4 @@ RETURN actor.name Neo4j supports the APOC (Awesome Procedures on Cypher) Core library. The APOC Core library provides access to user-defined procedures and functions which extend the use of the Cypher query language into areas such as data integration, graph algorithms, and data conversion. -For more details, visit the link:{neo4j-docs-base-uri}/apoc/current[APOC Core page]. \ No newline at end of file +For more details, visit the link:{neo4j-docs-base-uri}/apoc/current/[APOC Core page]. \ No newline at end of file diff --git a/modules/ROOT/pages/planning-and-tuning/execution-plans.adoc b/modules/ROOT/pages/planning-and-tuning/execution-plans.adoc index 49d9b6866..c884c9f59 100644 --- a/modules/ROOT/pages/planning-and-tuning/execution-plans.adoc +++ b/modules/ROOT/pages/planning-and-tuning/execution-plans.adoc @@ -91,8 +91,8 @@ MATCH (:Station { name: 'Denmark Hill' })<-[:CALLS_AT]-(d:Stop) RETURN count(*) ---- -This is the resulting execution planfootnote:[The format of the execution plans displayed in this section are those generated when using link:{neo4j-docs-base-uri}/operations-manual/current/tools/cypher-shell[Cypher Shell]. -The execution plans generated by link:{neo4j-docs-base-uri}/browser-manual/current[Neo4j Browser] use a different format.]: +This is the resulting execution planfootnote:[The format of the execution plans displayed in this section are those generated when using link:{neo4j-docs-base-uri}/operations-manual/current/cypher-shell/[Cypher Shell]. +The execution plans generated by link:{neo4j-docs-base-uri}/browser-manual/current/[Neo4j Browser] use a different format.]: [role="queryplan"] ---- diff --git a/modules/ROOT/pages/planning-and-tuning/runtimes/reference.adoc b/modules/ROOT/pages/planning-and-tuning/runtimes/reference.adoc index f87838ce1..1625330f1 100644 --- a/modules/ROOT/pages/planning-and-tuning/runtimes/reference.adoc +++ b/modules/ROOT/pages/planning-and-tuning/runtimes/reference.adoc @@ -27,7 +27,7 @@ For a full list of all available Cypher write clauses, see the xref:clauses/inde It is not possible to use the parallel runtime if a change has been made to the state of a transaction. -For example, the following transaction (initiated on link:{neo4j-docs-base-uri}/operations-manual/current/tools/cypher-shell[Cypher Shell]) will be rolled back, because executing a Cypher query will make changes to the state of a transaction. +For example, the following transaction (initiated on link:{neo4j-docs-base-uri}/operations-manual/current/cypher-shell/[Cypher Shell]) will be rolled back, because executing a Cypher query will make changes to the state of a transaction. .Step 1: Initiate a new transaction and change its state by creating a node [source, cypher, role=test-skip] diff --git a/modules/ROOT/pages/subqueries/subqueries-in-transactions.adoc b/modules/ROOT/pages/subqueries/subqueries-in-transactions.adoc index 2062b2802..f621bac94 100644 --- a/modules/ROOT/pages/subqueries/subqueries-in-transactions.adoc +++ b/modules/ROOT/pages/subqueries/subqueries-in-transactions.adoc @@ -220,7 +220,7 @@ For larger data sets, you might want to use larger batch sizes, such as `10000 R [[composite-databases]] == Composite databases -`CALL { ... } IN TRANSACTIONS` can be used with link:{neo4j-docs-base-uri}/operations-manual/current/composite-databases[composite databases]. +`CALL { ... } IN TRANSACTIONS` can be used with link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/composite-databases/concepts/[composite databases]. Even though composite databases allow accessing multiple graphs in a single query, only one graph can be modified in a single transaction. `CALL { ... } IN TRANSACTIONS` offers a way of constructing queries which modify multiple graphs. diff --git a/modules/ROOT/pages/syntax/parameters.adoc b/modules/ROOT/pages/syntax/parameters.adoc index 1820abd17..d236cb668 100644 --- a/modules/ROOT/pages/syntax/parameters.adoc +++ b/modules/ROOT/pages/syntax/parameters.adoc @@ -34,7 +34,7 @@ Setting parameters when running a query is dependent on the client environment. For example: * To set a parameter in Cypher Shell use `+:param name => 'Joe'+`. - For more information refer to link:{neo4j-docs-base-uri}/operations-manual/current/tools/cypher-shell#cypher-shell-parameters[Operations Manual -> Cypher Shell - Query Parameters]. + For more information refer to link:{neo4j-docs-base-uri}/operations-manual/current/cypher-shell/#cypher-shell-parameters[Operations Manual -> Cypher Shell - Query Parameters]. * For Neo4j Browser use the same syntax as Cypher Shell, `+:param name => 'Joe'+`. * When using drivers, the syntax is dependent on the language choice. See the examples in _Transactions_ in the link:{docs-base-uri}[Neo4j Driver manuals]. diff --git a/modules/ROOT/pages/values-and-types/maps.adoc b/modules/ROOT/pages/values-and-types/maps.adoc index 8f3057faf..17972af15 100644 --- a/modules/ROOT/pages/values-and-types/maps.adoc +++ b/modules/ROOT/pages/values-and-types/maps.adoc @@ -16,7 +16,7 @@ For information about how the `[]` operator behaves with respect to `null`, see == Literal maps The key names in a map must be literals. -If returned through an link:{neo4j-docs-base-uri}/http-api/current[HTTP API call], a JSON object will be returned. +If returned through an link:{neo4j-docs-base-uri}/http-api/current/[HTTP API call], a JSON object will be returned. If returned in Java, an object of type `java.util.Map` will be returned. From 4986ca0fdaee9d6d7cb2feec717740d74ae7540a Mon Sep 17 00:00:00 2001 From: Joel Bergstrand Date: Mon, 7 Jul 2025 13:33:23 +0200 Subject: [PATCH 21/21] Added note on NEXT limitations --- .../pages/queries/composed-queries/sequential-queries.adoc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/ROOT/pages/queries/composed-queries/sequential-queries.adoc b/modules/ROOT/pages/queries/composed-queries/sequential-queries.adoc index 02201607e..05104ba61 100644 --- a/modules/ROOT/pages/queries/composed-queries/sequential-queries.adoc +++ b/modules/ROOT/pages/queries/composed-queries/sequential-queries.adoc @@ -381,4 +381,8 @@ RETURN customer.firstName AS plantCustomer | "Niko" 1+d|Rows: 6 -|=== \ No newline at end of file +|=== + +[[next-unsupported-behavior]] +== Known limitations +`NEXT` currently does not support aggregations when the aggregation is used in a `UNION` query, wrapped in braces or after a `USE` clause.