Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
723c092
Update version to 5.23.
stefano-ottolenghi Jul 23, 2024
87a4ebf
Bump the prod-dependencies group with 2 updates (#1001)
dependabot[bot] Aug 5, 2024
5af2150
Add TIME ZONE alias (#1010)
gem-neo4j Aug 5, 2024
1044a9d
Fix result format of relationships function (#1011)
JPryce-Aklundh Aug 5, 2024
bd0b45f
Document Variable Scope Clause (#990)
JPryce-Aklundh Aug 8, 2024
eebc977
Fix typos on parsing page (#1014)
JPryce-Aklundh Aug 8, 2024
2014d2a
Add further considerations for CASE expressions (#1013)
gem-neo4j Aug 9, 2024
20b83d7
Remove link to Cartesian CRSs (#1016)
JPryce-Aklundh Aug 9, 2024
21d63cc
Fix typo in Patterns reference (#1017)
JPryce-Aklundh Aug 9, 2024
79cbee9
adding health warning about insecure protocols for LOAD CSV (#1006)
phil198 Aug 12, 2024
750a641
fix GQL table and update on CALL (#1018)
JPryce-Aklundh Aug 12, 2024
e6d0a27
link description correction (#1020)
phil198 Aug 12, 2024
d4ec5de
Remove Enterprise Edition label from GenAI plugin page (#1019)
JPryce-Aklundh Aug 13, 2024
63475f5
Update GQL wording (#1021)
JPryce-Aklundh Aug 13, 2024
e3ce55f
Update remaining queries using shortestPath() (#1022)
JPryce-Aklundh Aug 14, 2024
8df83ed
Add new vector index settings (#1009)
parnmatt Aug 16, 2024
a85c9fe
Correct documentation on comparing spatial values (#1023)
JPryce-Aklundh Aug 19, 2024
05aca7f
Add information about Text indexes and dictionary variables (#1026)
JPryce-Aklundh Aug 19, 2024
bd39e67
Add alias for index page (#1029)
JPryce-Aklundh Aug 20, 2024
dd11ea8
normalise vector index settings achors (#1030)
parnmatt Aug 20, 2024
176ef48
Merge branch 'dev' into 5.22_publish
JPryce-Aklundh Aug 22, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions antora.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ nav:
asciidoc:
attributes:
neo4j-version: '5'
neo4j-version-minor: '5.22'
neo4j-version-exact: '5.22.0'
neo4j-version-minor: '5.23'
neo4j-version-exact: '5.23.0'
10 changes: 5 additions & 5 deletions modules/ROOT/images/call_subquery_graph.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions modules/ROOT/pages/appendix/gql-conformance/index.adoc
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
:description: Overview of Cypher's conformance to GQL.
= GQL conformance

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

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

Expand Down Expand Up @@ -42,5 +42,5 @@ Neo4j 5.14 added support for JavaSE 21 and version 15 of the Unicode Standard.
For more information, see xref:syntax/parsing.adoc##_using_unicodes_in_cypher[Parsing -> Using Unicode in Cypher].
* 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`).
+
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`).
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`).
For more information, see xref:values-and-types/property-structural-constructed.adoc#_property_types[Values and types -> property types].
Original file line number Diff line number Diff line change
Expand Up @@ -71,23 +71,6 @@ The only way to guarantee row order in Neo4j is to use xref:clauses/order-by.ado
| xref:clauses/return.adoc[`RETURN`]
|

| 15.1
| <call procedure statement> and <procedure call>
| xref:clauses/call.adoc[`CALL` procedures], xref:subqueries/call-subquery.adoc[`CALL` subqueries].
| GQL defines an `OPTIONAL CALL` statement, enabling optional procedure and subquery calling.
This is not available in Cypher.

| 15.2
| <inline procedure call>
| xref:subqueries/call-subquery.adoc[`CALL` subqueries].
| GQL either imports variables implicitly, or explicitly using a variable scope clause.
In Cypher, `CALL` subqueries require an explicit importing `WITH` clause.

| 15.3
| <named procedure call>
| xref:clauses/call.adoc[`CALL` procedure]
|

| 16.2
| <limit clause>
| xref:clauses/limit.adoc[`LIMIT`]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,21 @@ In Cypher, `trim()` removes any whitespace character.
|
|

| GP01
| Inline procedure
| xref:subqueries/call-subquery.adoc[`CALL` subqueries]
|

| GP03
| Inline procedure with explicit nested variable scope
| xref:subqueries/call-subquery.adoc#variable-scope-clause[`CALL` subqueries -> Variable scope clause]
|

| GP04
| Named procedure calls
| xref:clauses/call.adoc[`CALL` procedure]
|

| GQ01
| `USE` graph clause
| xref:clauses/use.adoc[`USE`]
Expand Down
16 changes: 14 additions & 2 deletions modules/ROOT/pages/clauses/load-csv.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,15 @@ You can import data from a CSV file hosted on a remote path.
`LOAD CSV` supports accessing CSV files via HTTPS, HTTP, and FTP (with or without credentials).
It also follows redirects, except those changing the protocol (for security reasons).

[IMPORTANT]
====
It is strongly recommended to permit resource loading only over secure protocols such as HTTPS instead of insecure protocols like HTTP.
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.
If allowing an insecure protocol is absolutely unavoidable, Neo4j takes measures internally to enhance the security of these requests within their limitations.
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`].
====


.Import artists name and year information from a remote file via HTTPS
====

Expand Down Expand Up @@ -599,12 +608,15 @@ person_tmdbId,bio,born,bornIn,died,person_imdbId,name,person_poster,person_url
...
----

[NOTE]
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.
If you are using an older version of Neo4j, use an xref:subqueries/call-subquery.adoc#importing-with[importing `WITH` clause] instead.

.Query
[source, cypher]
----
LOAD CSV WITH HEADERS FROM 'https://data.neo4j.com/importing-cypher/persons.csv' AS row
CALL {
WITH row
CALL (row) {
MERGE (p:Person {tmdbId: row.person_tmdbId})
SET p.name = row.name, p.born = row.born
} IN TRANSACTIONS OF 200 ROWS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,102 @@ New features are added to the language continuously, and occasionally, some feat
This section lists all of the features that have been removed, deprecated, added, or extended in different Cypher versions.
Replacement syntax for deprecated and removed features are also indicated.

[[cypher-deprecations-additions-removals-5.23]]
== Neo4j 5.23

=== Deprecated features

[cols="2", options="header"]
|===
| Feature
| Details

a|
label:functionality[]
label:deprecated[]
[source, cypher, role="noheader"]
----
UNWIND [0, 1, 2] AS x
CALL {
WITH x
RETURN x * 10 AS y
}
RETURN x, y
----

| 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].
It is also deprecated to use naked subqueries without a variable scope clause.
|===

=== Updated features


[cols="2", options="header"]
|===
| Feature
| Details

a|
label:functionality[]
label:updated[]
[source, cypher, role="noheader"]
----
RETURN datetime.statement() IS :: TIMESTAMP WITH TIME ZONE
----
a|
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`).

See xref::values-and-types/property-structural-constructed.adoc#types-synonyms[types and their synonyms] for more.
|===

=== New features

[cols="2", options="header"]
|===
| Feature
| Details

a|
label:functionality[]
label:new[]
[source, cypher, role="noheader"]
----
UNWIND [0, 1, 2] AS x
CALL (x) {
RETURN x * 10 AS y
}
RETURN x, y
----

| Introduced a new xref:subqueries/call-subquery.adoc#variable-scope-clause[variable scope clause] to import variables in `CALL` subqueries.

a|
label:functionality[]
label:new[]
[source, cypher, role=noheader]
----
CREATE VECTOR INDEX moviePlots IF NOT EXISTS
FOR (m:Movie)
ON m.embedding
OPTIONS {indexConfig: {
`vector.quantization.enabled`: true
`vector.hnsw.m`: 16,
`vector.hnsw.ef_construction`: 100,
}}
----

a| Introduced the following xref:indexes/semantic-indexes/vector-indexes.adoc#configuration-settings[configuration settings] for vector indexes:

* `vector.quantization.enabled`: allows for enabling quantization, which can accelerate search performance but can also slightly decrease accuracy.

* `vector.hnsw.m`: controls the maximum number of connections each node has in the index's internal graph.

* `vector.hnsw.ef_construction`: sets the number of nearest neighbors tracked during the insertion of vectors into the index's internal graph.

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.

|===

[[cypher-deprecations-additions-removals-5.21]]
== Neo4j 5.21

Expand Down
15 changes: 10 additions & 5 deletions modules/ROOT/pages/genai-integrations.adoc
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
:description: Information about Neo4j's GenAI integrations.
:page-role: enterprise-edition new-5.17
:page-role: new-5.17
:test-setup-dump: https://github.com/neo4j-graph-examples/recommendations/raw/main/data/recommendations-50.dump
include::https://raw.githubusercontent.com/neo4j-graphacademy/courses/main/asciidoc/courses/llm-fundamentals/ad.adoc[]

[[genai-integrations]]
= GenAI integrations


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.
A prerequisite for using these features is that vector embeddings have been set as properties of these entities.
The GenAI plugin enables the creation of such embeddings using GenAI providers.
Expand All @@ -20,10 +21,13 @@ For a hands-on guide on how to use the GenAI plugin, see link:https://neo4j.com/

The GenAI plugin is enabled by default in Neo4j Aura.

For self-managed instances, the plugin is only available on Enterprise Edition and needs to be installed.
The plugin needs to be installed on self-managed instances.
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"]'`.
For more information, see link:{neo4j-docs-base-uri}/operations-manual/{page-version}/configuration/plugins/[Operations Manual -> Configure plugins].

[NOTE]
Prior to Neo4j 5.23, the GenAI plugin was only available on Neo4j Enterprise Edition.

[[example-graph]]
== Example graph

Expand Down Expand Up @@ -180,9 +184,8 @@ WITH collect(m) AS moviesList // <1>
count(*) AS total,
100 AS batchSize // <2>
UNWIND range(0, total, batchSize) AS batchStart // <3>
CALL { // <4>
WITH moviesList, batchStart, batchSize
WITH moviesList, batchStart, [movie IN moviesList[batchStart .. batchStart + batchSize] | movie.title || ': ' || movie.plot] AS resources // <5>
CALL (moviesList, batchStart, batchSize) { // <4>
WITH [movie IN moviesList[batchStart .. batchStart + batchSize] | movie.title || ': ' || movie.plot] AS resources // <5>
CALL genai.vector.encodeBatch(batch, 'OpenAI', { token: $token }) YIELD index, vector
CALL db.create.setNodeVectorProperty(moviesList[batchStart + index], 'embedding', vector) // <6>
} IN TRANSACTIONS OF 1 ROW <7>
Expand All @@ -194,6 +197,8 @@ Because vector embeddings can be very large, a larger batch size may require sig
Too large a batch size may also exceed the provider's threshold.
<3> Process `Movie` nodes in increments of `batchSize`.
<4> A xref:subqueries/subqueries-in-transactions.adoc[`CALL` subquery] executes a separate transaction for each batch.
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.
If you are using an older version of Neo4j, use an xref:subqueries/call-subquery.adoc#importing-with[importing `WITH` clause] instead.
<5> `resources` is a list of strings, each being the concatenation of `title` and `plot` of one movie.
<6> The procedure sets `vector` as value for the property named `embedding` for the node at position `batchStart + index` in the `moviesList`.
<7> Set to `1` the amount of batches to be processed at once.
Expand Down
Loading