Skip to content

Commit c0bb312

Browse files
JPryce-Aklundhstefano-ottolenghidependabot[bot]gem-neo4jphil198
authored
5.23 publish (#1031)
Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: Stefano Ottolenghi <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Gem Lamont <[email protected]> Co-authored-by: Phil Wright <[email protected]> Co-authored-by: Matthew Parnell <[email protected]> Co-authored-by: Richard Sill <[email protected]> Co-authored-by: Matthew Parnell <[email protected]>
1 parent 867fed1 commit c0bb312

File tree

17 files changed

+959
-483
lines changed

17 files changed

+959
-483
lines changed

antora.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ nav:
77
asciidoc:
88
attributes:
99
neo4j-version: '5'
10-
neo4j-version-minor: '5.22'
11-
neo4j-version-exact: '5.22.0'
10+
neo4j-version-minor: '5.23'
11+
neo4j-version-exact: '5.23.0'

modules/ROOT/images/call_subquery_graph.svg

Lines changed: 5 additions & 5 deletions
Loading

modules/ROOT/pages/appendix/gql-conformance/index.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
:description: Overview of Cypher's conformance to GQL.
22
= GQL conformance
33

4-
*Last updated*: 5 July 2024 +
5-
*Neo4j version*: 5.21
4+
*Last updated*: 9 August 2024 +
5+
*Neo4j version*: 5.23
66

77
GQL is the new link:https://www.iso.org/home.html[ISO] International Standard query language for graph databases.
88

@@ -42,5 +42,5 @@ Neo4j 5.14 added support for JavaSE 21 and version 15 of the Unicode Standard.
4242
For more information, see xref:syntax/parsing.adoc##_using_unicodes_in_cypher[Parsing -> Using Unicode in Cypher].
4343
* Cypher supports the following mandatory GQL property types: `BOOLEAN` (`BOOL`), `FLOAT` footnote:[The `FLOAT` type in Cypher always represents a 64-bit double-precision floating point number.], `INTEGER` (`SIGNED INTEGER`, or `INT`)footnote:[The `INTEGER` type in Cypher always represents a 64-bit `INTEGER`.], and `STRING` (`VARCHAR`).
4444
+
45-
Cypher also supports the following optional GQL property types: `DATE`, `DURATION`, `LIST<INNER_TYPE NOT NULL>` (`ARRAY<INNER_TYPE NOT NULL>`, `INNER_TYPE LIST`, or `INNER_TYPE ARRAY`)footnote:[The `INNER_TYPE` cannot be a `LIST` type.], `LOCAL DATETIME` (`TIMESTAMP WITHOUT TIMEZONE`), `LOCAL TIME` (`TIME WITHOUT TIME ZONE`), `POINT`, `ZONED DATETIME` (`TIME WITH TIMEZONE`), and `ZONED TIME` (`TIMESTAMP WITH TIMEZONE`).
45+
Cypher also supports the following optional GQL property types: `DATE`, `DURATION`, `LIST<INNER_TYPE NOT NULL>` (`ARRAY<INNER_TYPE NOT NULL>`, `INNER_TYPE LIST`, or `INNER_TYPE ARRAY`)footnote:[The `INNER_TYPE` cannot be a `LIST` type.], `LOCAL DATETIME` (`TIMESTAMP WITHOUT TIME ZONE`), `LOCAL TIME` (`TIME WITHOUT TIME ZONE`), `POINT`, `ZONED DATETIME` (`TIME WITH TIME ZONE`), and `ZONED TIME` (`TIMESTAMP WITH TIME ZONE`).
4646
For more information, see xref:values-and-types/property-structural-constructed.adoc#_property_types[Values and types -> property types].

modules/ROOT/pages/appendix/gql-conformance/supported-mandatory.adoc

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -71,23 +71,6 @@ The only way to guarantee row order in Neo4j is to use xref:clauses/order-by.ado
7171
| xref:clauses/return.adoc[`RETURN`]
7272
|
7373

74-
| 15.1
75-
| <call procedure statement> and <procedure call>
76-
| xref:clauses/call.adoc[`CALL` procedures], xref:subqueries/call-subquery.adoc[`CALL` subqueries].
77-
| GQL defines an `OPTIONAL CALL` statement, enabling optional procedure and subquery calling.
78-
This is not available in Cypher.
79-
80-
| 15.2
81-
| <inline procedure call>
82-
| xref:subqueries/call-subquery.adoc[`CALL` subqueries].
83-
| GQL either imports variables implicitly, or explicitly using a variable scope clause.
84-
In Cypher, `CALL` subqueries require an explicit importing `WITH` clause.
85-
86-
| 15.3
87-
| <named procedure call>
88-
| xref:clauses/call.adoc[`CALL` procedure]
89-
|
90-
9174
| 16.2
9275
| <limit clause>
9376
| xref:clauses/limit.adoc[`LIMIT`]

modules/ROOT/pages/appendix/gql-conformance/supported-optional.adoc

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,21 @@ In Cypher, `trim()` removes any whitespace character.
129129
|
130130
|
131131

132+
| GP01
133+
| Inline procedure
134+
| xref:subqueries/call-subquery.adoc[`CALL` subqueries]
135+
|
136+
137+
| GP03
138+
| Inline procedure with explicit nested variable scope
139+
| xref:subqueries/call-subquery.adoc#variable-scope-clause[`CALL` subqueries -> Variable scope clause]
140+
|
141+
142+
| GP04
143+
| Named procedure calls
144+
| xref:clauses/call.adoc[`CALL` procedure]
145+
|
146+
132147
| GQ01
133148
| `USE` graph clause
134149
| xref:clauses/use.adoc[`USE`]

modules/ROOT/pages/clauses/load-csv.adoc

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,15 @@ You can import data from a CSV file hosted on a remote path.
9090
`LOAD CSV` supports accessing CSV files via HTTPS, HTTP, and FTP (with or without credentials).
9191
It also follows redirects, except those changing the protocol (for security reasons).
9292

93+
[IMPORTANT]
94+
====
95+
It is strongly recommended to permit resource loading only over secure protocols such as HTTPS instead of insecure protocols like HTTP.
96+
This can be done by limiting the link:{neo4j-docs-base-uri}/operations-manual/{page-version}/authentication-authorization/load-privileges/#access-control-load-cidr/[load privileges] to only trusted sources that use secure protocols.
97+
If allowing an insecure protocol is absolutely unavoidable, Neo4j takes measures internally to enhance the security of these requests within their limitations.
98+
However, this means that insecure URLs on virtual hosts will not function unless you add the JVM argument `-Dsun.net.http.allowRestrictedHeaders=true` to the configuration setting link:{neo4j-docs-base-uri}/operations-manual/{page-version}/configuration/configuration-settings/#config_server.jvm.additional/[`server.jvm.additional`].
99+
====
100+
101+
93102
.Import artists name and year information from a remote file via HTTPS
94103
====
95104
@@ -599,12 +608,15 @@ person_tmdbId,bio,born,bornIn,died,person_imdbId,name,person_poster,person_url
599608
...
600609
----
601610
611+
[NOTE]
612+
The below query uses a xref:subqueries/call-subquery.adoc#variable-scope-clause[variable scope clause] (introduced in Neo4j 5.23) to import variables into the `CALL` subquery.
613+
If you are using an older version of Neo4j, use an xref:subqueries/call-subquery.adoc#importing-with[importing `WITH` clause] instead.
614+
602615
.Query
603616
[source, cypher]
604617
----
605618
LOAD CSV WITH HEADERS FROM 'https://data.neo4j.com/importing-cypher/persons.csv' AS row
606-
CALL {
607-
WITH row
619+
CALL (row) {
608620
MERGE (p:Person {tmdbId: row.person_tmdbId})
609621
SET p.name = row.name, p.born = row.born
610622
} IN TRANSACTIONS OF 200 ROWS

modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,102 @@ New features are added to the language continuously, and occasionally, some feat
1616
This section lists all of the features that have been removed, deprecated, added, or extended in different Cypher versions.
1717
Replacement syntax for deprecated and removed features are also indicated.
1818

19+
[[cypher-deprecations-additions-removals-5.23]]
20+
== Neo4j 5.23
21+
22+
=== Deprecated features
23+
24+
[cols="2", options="header"]
25+
|===
26+
| Feature
27+
| Details
28+
29+
a|
30+
label:functionality[]
31+
label:deprecated[]
32+
[source, cypher, role="noheader"]
33+
----
34+
UNWIND [0, 1, 2] AS x
35+
CALL {
36+
WITH x
37+
RETURN x * 10 AS y
38+
}
39+
RETURN x, y
40+
----
41+
42+
| Using the xref:subqueries/call-subquery.adoc#importing-with[`WITH` clause to import variables] to `CALL` subqueries is deprecated, and replaced with a xref:subqueries/call-subquery.adoc#variable-scope-clause[variable scope clause].
43+
It is also deprecated to use naked subqueries without a variable scope clause.
44+
|===
45+
46+
=== Updated features
47+
48+
49+
[cols="2", options="header"]
50+
|===
51+
| Feature
52+
| Details
53+
54+
a|
55+
label:functionality[]
56+
label:updated[]
57+
[source, cypher, role="noheader"]
58+
----
59+
RETURN datetime.statement() IS :: TIMESTAMP WITH TIME ZONE
60+
----
61+
a|
62+
Introduced new GQL conformant aliases to duration types: `TIMESTAMP WITHOUT TIME ZONE` (alias to `LOCAL DATETIME`), `TIME WITHOUT TIME ZONE` (alias to `LOCAL TIME`), `TIMESTAMP WITH TIME ZONE` (alias to `ZONED DATETIME`), and `TIME WITH TIME ZONE` (alias to `ZONED TIME`).
63+
64+
See xref::values-and-types/property-structural-constructed.adoc#types-synonyms[types and their synonyms] for more.
65+
|===
66+
67+
=== New features
68+
69+
[cols="2", options="header"]
70+
|===
71+
| Feature
72+
| Details
73+
74+
a|
75+
label:functionality[]
76+
label:new[]
77+
[source, cypher, role="noheader"]
78+
----
79+
UNWIND [0, 1, 2] AS x
80+
CALL (x) {
81+
RETURN x * 10 AS y
82+
}
83+
RETURN x, y
84+
----
85+
86+
| Introduced a new xref:subqueries/call-subquery.adoc#variable-scope-clause[variable scope clause] to import variables in `CALL` subqueries.
87+
88+
a|
89+
label:functionality[]
90+
label:new[]
91+
[source, cypher, role=noheader]
92+
----
93+
CREATE VECTOR INDEX moviePlots IF NOT EXISTS
94+
FOR (m:Movie)
95+
ON m.embedding
96+
OPTIONS {indexConfig: {
97+
`vector.quantization.enabled`: true
98+
`vector.hnsw.m`: 16,
99+
`vector.hnsw.ef_construction`: 100,
100+
}}
101+
----
102+
103+
a| Introduced the following xref:indexes/semantic-indexes/vector-indexes.adoc#configuration-settings[configuration settings] for vector indexes:
104+
105+
* `vector.quantization.enabled`: allows for enabling quantization, which can accelerate search performance but can also slightly decrease accuracy.
106+
107+
* `vector.hnsw.m`: controls the maximum number of connections each node has in the index's internal graph.
108+
109+
* `vector.hnsw.ef_construction`: sets the number of nearest neighbors tracked during the insertion of vectors into the index's internal graph.
110+
111+
Additionally, as of Neo4j 5.23, it is no longer mandatory to configure the settings `vector.dimensions` and `vector.similarity_function` when creating a vector index.
112+
113+
|===
114+
19115
[[cypher-deprecations-additions-removals-5.21]]
20116
== Neo4j 5.21
21117

modules/ROOT/pages/genai-integrations.adoc

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
:description: Information about Neo4j's GenAI integrations.
2-
:page-role: enterprise-edition new-5.17
2+
:page-role: new-5.17
33
:test-setup-dump: https://github.com/neo4j-graph-examples/recommendations/raw/main/data/recommendations-50.dump
44
include::https://raw.githubusercontent.com/neo4j-graphacademy/courses/main/asciidoc/courses/llm-fundamentals/ad.adoc[]
55

66
[[genai-integrations]]
77
= GenAI integrations
88

9+
910
Neo4j's xref:indexes/semantic-indexes/vector-indexes.adoc[] and xref:functions/vector.adoc[] allow you to calculate the similarity between node and relationship properties in a graph.
1011
A prerequisite for using these features is that vector embeddings have been set as properties of these entities.
1112
The GenAI plugin enables the creation of such embeddings using GenAI providers.
@@ -20,10 +21,13 @@ For a hands-on guide on how to use the GenAI plugin, see link:https://neo4j.com/
2021

2122
The GenAI plugin is enabled by default in Neo4j Aura.
2223

23-
For self-managed instances, the plugin is only available on Enterprise Edition and needs to be installed.
24+
The plugin needs to be installed on self-managed instances.
2425
This is done by moving the `neo4j-genai.jar` file from `/products` to `/plugins` in the Neo4j home directory, or, if you are using Docker, by starting the Docker container with the extra parameter `--env NEO4J_PLUGINS='["genai"]'`.
2526
For more information, see link:{neo4j-docs-base-uri}/operations-manual/{page-version}/configuration/plugins/[Operations Manual -> Configure plugins].
2627

28+
[NOTE]
29+
Prior to Neo4j 5.23, the GenAI plugin was only available on Neo4j Enterprise Edition.
30+
2731
[[example-graph]]
2832
== Example graph
2933

@@ -180,9 +184,8 @@ WITH collect(m) AS moviesList // <1>
180184
count(*) AS total,
181185
100 AS batchSize // <2>
182186
UNWIND range(0, total, batchSize) AS batchStart // <3>
183-
CALL { // <4>
184-
WITH moviesList, batchStart, batchSize
185-
WITH moviesList, batchStart, [movie IN moviesList[batchStart .. batchStart + batchSize] | movie.title || ': ' || movie.plot] AS resources // <5>
187+
CALL (moviesList, batchStart, batchSize) { // <4>
188+
WITH [movie IN moviesList[batchStart .. batchStart + batchSize] | movie.title || ': ' || movie.plot] AS resources // <5>
186189
CALL genai.vector.encodeBatch(batch, 'OpenAI', { token: $token }) YIELD index, vector
187190
CALL db.create.setNodeVectorProperty(moviesList[batchStart + index], 'embedding', vector) // <6>
188191
} IN TRANSACTIONS OF 1 ROW <7>
@@ -194,6 +197,8 @@ Because vector embeddings can be very large, a larger batch size may require sig
194197
Too large a batch size may also exceed the provider's threshold.
195198
<3> Process `Movie` nodes in increments of `batchSize`.
196199
<4> A xref:subqueries/subqueries-in-transactions.adoc[`CALL` subquery] executes a separate transaction for each batch.
200+
Note that this `CALL` subquery uses a xref:subqueries/call-subquery.adoc#variable-scope-clause[variable scope clause] (introduced in Neo4j 5.23) to import variables.
201+
If you are using an older version of Neo4j, use an xref:subqueries/call-subquery.adoc#importing-with[importing `WITH` clause] instead.
197202
<5> `resources` is a list of strings, each being the concatenation of `title` and `plot` of one movie.
198203
<6> The procedure sets `vector` as value for the property named `embedding` for the node at position `batchStart + index` in the `moviesList`.
199204
<7> Set to `1` the amount of batches to be processed at once.

0 commit comments

Comments
 (0)