Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion antora.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ nav:
- modules/ROOT/content-nav.adoc
asciidoc:
attributes:
neo4j-version: '2025.09'
neo4j-version: '2025.10'
1 change: 1 addition & 0 deletions modules/ROOT/content-nav.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
** xref::values-and-types/spatial.adoc[]
** xref::values-and-types/lists.adoc[]
** xref::values-and-types/maps.adoc[]
** xref::values-and-types/vector.adoc[]
** xref:values-and-types/graph-references.adoc[]
** xref::values-and-types/working-with-null.adoc[]
** xref::values-and-types/casting-data.adoc[]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,14 @@ Either the pattern already exists, or it needs to be created.
| Cypher feature
| Description

| xref:values-and-types/maps.adoc#query-operators-list[`MAP` values].
| Map values - the GQL equivalent is Records.

| xref:values-and-types/spatial.adoc[`POINT` values]
| Spatial values.

| xref:values-and-types/maps.adoc#query-operators-list[`MAP` values].
| Map values - the GQL equivalent is Records.
| xref:values-and-types/vector.adoc[`VECTOR<TYPE>(DIMENSION)` values]
| Vector values, defined with a coordinate type and dimension.

|===

Expand Down
221 changes: 137 additions & 84 deletions modules/ROOT/pages/constraints/managing-constraints.adoc

Large diffs are not rendered by default.

10 changes: 8 additions & 2 deletions modules/ROOT/pages/constraints/syntax.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ If a name is not explicitly given, a unique name will be auto-generated.
[NOTE]
Creating a constraint requires the link:{neo4j-docs-base-uri}/operations-manual/current/authentication-authorization/database-administration/#access-control-database-administration-constraints[`CREATE CONSTRAINT` privilege].

The `CREATE CONSTRAINT` command is optionally idempotent.
The `CREATE CONSTRAINT` command is optionally idempotent.
This means its default behavior is to throw an error if an attempt is made to create the same constraint twice.
With the `IF NOT EXISTS` flag, no error is thrown and nothing happens should a constraint with the same name or same schema and constraint type already exist.
It may still throw an error if conflicting data, indexes, or constraints exist.
Expand Down Expand Up @@ -122,6 +122,7 @@ Where `<TYPE>` is one of the following property types:
* `ZONED DATETIME`
* `DURATION`
* `POINT`
* `VECTOR<TYPE>(DIMENSION)` label:cypher[Cypher 25 only] label:new[Introduced in Neo4j 2025.10]
* `LIST<BOOLEAN NOT NULL>`
* `LIST<STRING NOT NULL>`
* `LIST<INTEGER NOT NULL>`
Expand All @@ -135,6 +136,11 @@ Where `<TYPE>` is one of the following property types:
* `LIST<POINT NOT NULL>`
* Any closed dynamic union of the above types, e.g. `INTEGER | FLOAT | STRING`.

[NOTE]
Because storing lists of xref:values-and-types/vector.adoc[`VECTOR`] values is not supported, property type constraints cannot be created for `LIST<VECTOR<TYPE>(DIMENSION) NOT NULL>`.
Additionally, `VECTOR` property type constraints must be created with a specific dimension and coordinate value, where the dimension must be greater than `0` and less than or equal to `4096`.
For more information, see xref:values-and-types/vector.adoc[Values and types -> Vectors].

Allowed syntax variations of these types are listed in xref::values-and-types/property-structural-constructed.adoc#types-synonyms[Types and their synonyms].

For examples on how to create property type constraints, see xref:constraints/managing-constraints.adoc#create-property-type-constraints[Create, show, and drop constraints -> Create property type constraints].
Expand Down Expand Up @@ -310,4 +316,4 @@ This means its default behavior is to throw an error if an attempt is made to dr
With the `IF EXISTS` flag, no error is thrown and nothing happens should the constraint not exist.
Instead, an informational notification is returned detailing that the constraint does not exist.

For examples on how to drop constraints, see xref:constraints/managing-constraints.adoc#drop-constraint[Create, show, and drop constraints -> DROP CONSTRAINT].
For examples on how to drop constraints, see xref:constraints/managing-constraints.adoc#drop-constraint[Create, show, and drop constraints -> DROP CONSTRAINT].
146 changes: 131 additions & 15 deletions modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,123 @@ Cypher 25 was introduced in Neo4j 2025.06 and can only be used on Neo4j 2025.06+
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.10]]
== Neo4j 2025.10

=== New in Cypher 25

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

a|
label:functionality[]
label:new[]
[source, cypher]
----
VECTOR([1.05, 0.123, 5], 3, FLOAT32 NOT NULL)
----

a| Introduced a `VECTOR` value type that can be stored as xref:indexes/semantic-indexes/vector-indexes.adoc#embeddings[embedding] properties on nodes and relationships and utilized for efficient semantic retrieval using Neo4j's xref:indexes/semantic-indexes/vector-indexes.adoc[vector indexes] and xref:genai-integrations.adoc[GenAI plugin].
For more information, see xref:values-and-types/vector.adoc[Values and types -> Vectors].

a|
label:functionality[]
label:new[]
[source, cypher]
----
WITH vector([1, 2, 3], 3, INTEGER) AS vector
RETURN vector, valueType(vector) AS vectorType
----

a| New xref:functions/vector.adoc#functions-vector[`vector()`] function for the construction of xref:values-and-types/vector.adoc[`VECTOR`] values.

a|
label:functionality[]
label:new[]
[source, cypher]
----
RETURN vector_dimension_count(vector([1, 2, 3], 3, INTEGER)) AS size
----

a| New xref:functions/vector.adoc#functions-vector_dimension_count[`vector_dimension_count()`] function, which returns the dimension of a xref:values-and-types/vector.adoc[`VECTOR`] value.

a|
label:functionality[]
label:new[]
[source, cypher]
----
RETURN vector_distance(vector([1, 2, 3], 3, INT), vector([1, 2, 4], 3, INT), COSINE) AS distance
----

a| New xref:functions/vector.adoc#functions-vector_distance[`vector_distance()`] function, which returns the distance between two xref:values-and-types/vector.adoc[`VECTOR`] values based on the selected `vectorDistanceMetric` algorithm.

a|
label:functionality[]
label:new[]
[source, cypher]
----
RETURN vector_norm(vector([1.0, 5.0, 3.0, 6.7], 4, FLOAT), EUCLIDEAN) AS norm
----

a| New xref:functions/vector.adoc#functions-vector_norm[`vector_norm()`] function, which returns the distance between the given vector and an origin vector, which is a vector with the same dimension with all coordinates set to zero, calculated using the specified `vectorDistanceMetric`.

a|
label:functionality[]
label:new[]
[source, cypher, role="noheader"]
----
CREATE CONSTRAINT node_vector_constraint
FOR (n:Movie) REQUIRE n.embedding IS :: VECTOR<INT32>(42)
----

[source, cypher, role="noheader"]
----
CREATE CONSTRAINT rel_vector_constraint
FOR ()-[r:CONTAINS]->() REQUIRE r.embedding IS :: VECTOR<FLOAT32>(1536)
----

a| Introduced `VECTOR` property type constraints.
For more information, see xref:constraints/managing-constraints.adoc#create-property-type-constraints[Create property type constraints].

|===

=== Updated in Cypher 25

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

a|
label:functionality[]
label:updated[]
[source, cypher]
----
RETURN toFloatList(Vector([1, 2, 3], 3, INTEGER64)),
toIntegerList(Vector([1, 2, 3], 3, INTEGER8)),
vector.similarity.cosine(vector([3, 5, 7], 3, INT), vector([-1, -2, -3], 3, INT)),
vector.similarity.euclidean(vector([3, 5, 7], 3, INT), vector([-1, -2, -3], 3, INT))
----

a| The xref:functions/list.adoc#functions-tofloatlist[`toFloatList()`], xref:functions/list.adoc#functions-tointegerlist[`toIntegerList()`], xref:functions/vector.adoc#functions-similarity-cosine[`vector.similarity.cosine()`], and xref:functions/vector.adoc#functions-similarity-euclidean[`vector.similarity.euclidean()`] functions now accept `VECTOR` values as input arguments.

a|
label:functionality[]
label:updated[]
[source, cypher]
----
RETURN datetime('11/18/1986', "MM/dd/yyyy") AS dt
----

| The following constructors of temporal types have been extended with the optional argument `pattern`:
xref:functions/temporal/index.adoc#functions-date[date()], xref:functions/temporal/index.adoc#functions-datetime[datetime()], xref:functions/temporal/index.adoc#functions-localdatetime[localdatetime()], xref:functions/temporal/index.adoc#functions-localtime[localtime()], xref:functions/temporal/index.adoc#functions-time[time()] and xref:functions/temporal/duration.adoc#functions-durations[duration()].
These patterns are the same as those used to create temporal strings with the xref:functions/temporal/format.adoc[`format()`] function introduced in 2025.09 and thus allow for the parsing of temporal strings into temporal values.
|===


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

Expand All @@ -43,7 +160,7 @@ RETURN format(dt, "MM/dd/yyyy") AS US, format(dt, "dd/MM/yyyy") AS EU

| Cypher's new xref:functions/temporal/format.adoc[`format()`] function can create dynamically formatted string representations of temporal instance and duration types.

a|
a|
label:functionality[]
label:new[]

Expand Down Expand Up @@ -94,7 +211,7 @@ label:functionality[]
label:updated[]
[source, cypher]
----
PROFILE
PROFILE
WITH "Person" AS label
MATCH (people:$(label))
RETURN people.name
Expand All @@ -118,7 +235,7 @@ label:new[]
----
MATCH (()-->(n))+
WHERE allReduce(acc = 0, node IN n \| acc + node.x, 6 < acc < 30)
RETURN [i IN n \| i.x] AS sequence
RETURN [i IN n \| i.x] AS sequence
ORDER BY head(n).x, size(n)
----

Expand Down Expand Up @@ -151,7 +268,6 @@ RETURN n:$(<expr3>)
| Added the ability to dynamically reference node labels and relationship types in places where xref:patterns/reference.adoc#label-expressions[label expressions] are allowed.
|===


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

Expand Down Expand Up @@ -492,10 +608,10 @@ label:new[]
----
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
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.
Expand Down Expand Up @@ -917,7 +1033,7 @@ CASE x ... WHEN contains - 1 THEN ... END
a| Using a variable named `contains` (or any casing variant, like `CONTAINS`) in addition or subtraction operations within a `WHEN` operand of a xref:expressions/conditional-expressions.adoc#case-simple[simple `CASE`] expression is deprecated.
To continue using variables with this name, use backticks to quote the variable name:

* Additions: `CASE x ... WHEN ++`contains`++ + 1 THEN ... END`
* Additions: `CASE x ... WHEN ++`contains`++ + 1 THEN ... END`
* Subtractions: `CASE x ... WHEN ++`contains`++ - 1 THEN ... END`

a|
Expand All @@ -932,8 +1048,8 @@ CASE x ... WHEN in["abc"] THEN ... END
----
a| Using the `[]` operator on a variable named `in` (or any casing variant, like `IN`) within a `WHEN` operand of a xref:expressions/conditional-expressions.adoc#case-simple[simple `CASE`] expression is deprecated.
To continue using variables with this name, use backticks to quote the variable name:
* `CASE x ... WHEN ++`in`++[1] THEN ... END`

* `CASE x ... WHEN ++`in`++[1] THEN ... END`
* `CASE x ... WHEN ++`in`++["abc"] THEN ... END`


Expand Down Expand Up @@ -1132,7 +1248,7 @@ label:functionality[]
label:updated[]
[source, cypher, role="noheader"]
----
CREATE (n:Label {property: 'name'}),
CREATE (n:Label {property: 'name'}),
()-[r:REL_TYPE]->()
----
| Neo4j's link:{neo4j-docs-base-uri}/operations-manual/current/database-internals/store-formats/#store-format-overview[block format] now implements xref:appendix/gql-conformance/index.adoc[GQL's] limit on the maximum length of identifiers.
Expand Down Expand Up @@ -1183,7 +1299,7 @@ RETURN t AS team, players

[source, cypher, role="noheader"]
----
OPTIONAL CALL db.labels() YIELD label
OPTIONAL CALL db.labels() YIELD label
RETURN label
----

Expand Down Expand Up @@ -1534,7 +1650,7 @@ MATCH SHORTEST 2 GROUPS (:A)-[:R]->{0,10}(:B)

a| Introduced new graph pattern matching keywords to find variations of the xref:patterns/shortest-paths.adoc[shortest paths] between nodes.

a|
a|
label:functionality[]
label:new[]

Expand Down Expand Up @@ -4732,4 +4848,4 @@ MATCH (n:N {prop1: 42} WHERE n.prop2 > 42)
a|
New syntax that enables inlining of `WHERE` clauses inside node patterns.

|===
|===
Loading