Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
5a98979
fix Cypher 25 queries (#1309)
JPryce-Aklundh Jun 18, 2025
742fc81
add xrefs for constraints index page (#1311)
JPryce-Aklundh Jun 18, 2025
9c57b8e
match modes and NEXT cheat sheet tags (#1310)
JPryce-Aklundh Jun 18, 2025
0e14511
List removed, deprecated, new options of the CREATE db cmd (#1312)
NataliaIvakina Jun 18, 2025
e509773
Add missing Cypher 25 updates (GQL extended identifiers + subqeury ex…
JPryce-Aklundh Jun 19, 2025
3a2dd81
Mark 25 as prerelease - force sitemap to Cypher 5 (#1316)
recrwplay Jun 23, 2025
caeeee4
Select Cypher version (#1123)
JPryce-Aklundh Jun 23, 2025
d14b25d
Bump the dev-dependencies group with 2 updates (#1318)
dependabot[bot] Jun 24, 2025
0c0caa3
Bump the prod-dependencies group with 5 updates (#1319)
dependabot[bot] Jun 24, 2025
6a05b2f
introduction note about Cypher 25 (#1320)
JPryce-Aklundh Jun 24, 2025
17d3ce3
update removals & deprecations for graph references (#1315)
nadja-muller Jun 24, 2025
dac419b
fix link
JPryce-Aklundh Jun 24, 2025
8cc167e
conditional query graph (#1322)
JPryce-Aklundh Jun 24, 2025
a712679
add cypher-5 to pr checks (#1324)
JPryce-Aklundh Jun 25, 2025
6814407
2025.07 antora update (#1326)
JPryce-Aklundh Jun 26, 2025
26933f2
Add language version control commands to Additions page (#1314)
JPryce-Aklundh Jun 27, 2025
854b3c3
Add cheat sheet tags for language version options (#1330)
JPryce-Aklundh Jun 27, 2025
3d3070d
minor fix to select version (#1331)
JPryce-Aklundh Jun 27, 2025
bd97e08
Fix last remaining broken links (#1332)
JPryce-Aklundh Jun 27, 2025
d3b1cef
Clause composition: Write-read conflicts (#1328)
WilcoNeo Jul 1, 2025
0e8aeab
Update Select Cypher versions guide with relevant links to Operations…
JPryce-Aklundh Jul 2, 2025
11b2004
Update links with their redirects URLs. (#1334)
stefano-ottolenghi Jul 4, 2025
ec5d804
Added note on NEXT limitations (#1338)
JoelBergstrand Jul 8, 2025
3ce0fcf
Include updates in NEXT limitations (#1341)
JoelBergstrand Jul 17, 2025
0697dbe
Update recommendations dataset URL.
stefano-ottolenghi Jul 21, 2025
1ccfc70
Add dynamic label and type support in label expressions (#1339)
gem-neo4j Jul 31, 2025
5574338
Name Repeat operator without Trail/Walk parameter (#1343)
arnefischereit Jul 31, 2025
e964205
added block syntax to an IMPORTANT admonition
rsill-neo4j Jul 31, 2025
1172968
Remove Neo4j version from PDF title (#1347)
recrwplay Aug 1, 2025
e0be1d3
added select cypher versions link (#1348)
rsill-neo4j Aug 1, 2025
7a53b3b
corrected blog post link
rsill-neo4j Aug 1, 2025
e56e0d7
blog post link in correct page
rsill-neo4j Aug 1, 2025
2e4a679
More blog post links (#1349)
rsill-neo4j Aug 1, 2025
1f9fe09
update antora for 2025.08 (#1350)
JPryce-Aklundh Aug 4, 2025
1da5417
Fix links to ops manual for select Cypher versions (#1351)
JPryce-Aklundh Aug 4, 2025
57d10bf
Fix broken links (#1352)
JPryce-Aklundh Aug 4, 2025
d41c768
Renaming overview.adoc to index (#1353)
lidiazuin Aug 7, 2025
ebe0db3
Bump the prod-dependencies group with 2 updates (#1356)
dependabot[bot] Aug 12, 2025
ce50d37
fix show functions query for 2025.08 (#1358)
JPryce-Aklundh Aug 13, 2025
fc97cdc
Add new repeatable elements blog to Further Reading (#1359)
JPryce-Aklundh Aug 13, 2025
7fc9c3e
`allReduce()` function (#1357)
JPryce-Aklundh Aug 14, 2025
5efacb1
New operators for Dynamic values (#1360)
JPryce-Aklundh Aug 14, 2025
8acc4f8
add new dynamic operators to overview table (#1363)
JPryce-Aklundh Aug 18, 2025
83341f0
dynamiclabelnodelookup not dynamicnodelabellookup (#1364)
JPryce-Aklundh Aug 18, 2025
219ff14
Put examples with OpenAI tokens under testing (#1362)
stefano-ottolenghi Aug 20, 2025
3213b93
Added section on by-table semantics (#1345)
JoelBergstrand Aug 22, 2025
23a5a5d
Shortest paths planning and performance (#1361)
JPryce-Aklundh Aug 22, 2025
50b9f08
Clarify `indexes` return column for `SHOW TRANSACTIONS` when dynamic …
JPryce-Aklundh Aug 22, 2025
3617d82
remove old shortest path tutorial (#1367)
JPryce-Aklundh Aug 22, 2025
8dc7387
fix links
JPryce-Aklundh Aug 25, 2025
b083943
clarifying note about default databases (#1370)
JPryce-Aklundh Aug 25, 2025
1c61fcb
Clarify runtimes on CE and EE (#1369)
JPryce-Aklundh Aug 25, 2025
e48f260
Add another criteria for when SHORTEST queries are rewritten with to …
JPryce-Aklundh Aug 26, 2025
f7f362b
Fulltext index provider to 2.0 in SHOW FULLTEXT INDEX examples (#1368)
JPryce-Aklundh Aug 26, 2025
a0fa067
allreduce cheat sheet tags update (#1373)
JPryce-Aklundh Aug 27, 2025
ae678bc
Bump @neo4j-antora/antora-modify-sitemaps from 0.7.1 to 0.7.2 in the …
dependabot[bot] Aug 27, 2025
eabe1e2
remove duplicate replace tags
JPryce-Aklundh Aug 28, 2025
3191ccb
Cypher 25 only roles (#1376)
JPryce-Aklundh Sep 1, 2025
0f51f03
allReduce Cypher 25 label
JPryce-Aklundh Sep 1, 2025
c572c20
different relationships keyword only cypher 25
JPryce-Aklundh Sep 1, 2025
5219e97
More Cypher 25 only labels
JPryce-Aklundh Sep 1, 2025
4605e22
fix
JPryce-Aklundh Sep 2, 2025
6520ef2
package fixes
JPryce-Aklundh Sep 2, 2025
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.07'
neo4j-version: '2025.08'
74 changes: 37 additions & 37 deletions modules/ROOT/images/graph-predicate-functions.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 0 additions & 12 deletions modules/ROOT/images/predicate-function-example.svg

This file was deleted.

20 changes: 9 additions & 11 deletions modules/ROOT/pages/clauses/listing-functions.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -254,19 +254,17 @@ WHERE name STARTS WITH 'a'
|===
| name | isBuiltIn

| "abs" | true
| "abs" | true
| "acos" | true
| "all" | true
| "any" | true
| "asin" | true
| "atan" | true
| "abs" | true
| "acos" | true
| "all" | true
| "allReduce" | true
| "any" | true
| "asin" | true
| "atan" | true
| "atan2" | true
| "avg" | true
| "avg" | true
| "avg" | true
| "avg" | true

2+d|Rows: 11
2+d|Rows: 9
|===


Expand Down
22 changes: 19 additions & 3 deletions modules/ROOT/pages/clauses/match.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -639,10 +639,26 @@ RETURN relationshipType, count(r) AS relationshipCount
[[dynamic-match-caveats]]
=== Performance caveats

`MATCH` queries using dynamic values may not be as performant as those using static values.
This is because the xref:planning-and-tuning/execution-plans.adoc[Cypher planner] uses statically available information when planning queries to determine whether to use an xref:indexes/search-performance-indexes/index.adoc[index] or not, and this is not possible when using dynamic values.
`MATCH` queries that use dynamic values may not perform as well as those with static values.
Neo4j is actively working to improve the performance of these queries.
The table below outlines performance caveats for specific Neo4j versions.

As a result, `MATCH` queries using dynamic values cannot leverage xref:planning-and-tuning/operators/operators-detail.adoc#leaf-operators[index scans or seeks] and must instead use the xref:planning-and-tuning/operators/operators-detail.adoc#query-plan-all-nodes-scan[`AllNodesScan`] operator, which reads all nodes from the node store and is therefore more costly.
.Neo4j versions and performance caveats
[%header,cols="a,5a"]
|===
| Neo4j versions | Performance caveat

| 5.26 -- 2025.07
| The xref:planning-and-tuning/execution-plans.adoc[Cypher planner] is not able to leverage xref:indexes/search-performance-indexes/index.adoc[indexes] with xref:planning-and-tuning/operators/operators-detail.adoc#leaf-operators[index scans or seeks] and must instead utilize the xref:planning-and-tuning/operators/operators-detail.adoc#query-plan-all-nodes-scan[`AllNodesScan`] operator, which reads all nodes from the node store and is therefore more costly.

| 2025.08 -- current
| The Cypher planner is able to leverage xref:indexes/search-performance-indexes/using-indexes.adoc#token-lookup-indexes[token lookup indexes] when matching node labels and relationship types dynamically.
This is enabled by the introduction of three new query plan operators:
xref:planning-and-tuning/operators/operators-detail.adoc#query-plan-dynamic-label-node-lookup[`DynamicLabelNodeLookup`], xref:planning-and-tuning/operators/operators-detail.adoc#query-plan-dynamic-directed-relationship-type-lookup[`DynamicDirectedRelationshipTypeLookup`], and xref:planning-and-tuning/operators/operators-detail.adoc#query-plan-dynamic-undirected-relationship-type-lookup[`DynamicUndirectedRelationshipTypeLookup`].
It is not, however, able to use indexes on property values.
For example, `MATCH (n:$(Label) {foo: bar})` will not use any indexes on `n.foo` but can use a `DynamicLabelNodeLookup` on `$(label)`.

|===

[[further-reading]]
=== Further reading
Expand Down
49 changes: 15 additions & 34 deletions modules/ROOT/pages/clauses/merge.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -740,42 +740,23 @@ RETURN greta.name AS name, labels(greta) AS labels, type(rel) AS relType, collec
[[dynamic-merge-caveats]]
=== Performance caveats

`MERGE` queries that use dynamic values may not be as performant as those using static values.
This is because the xref:planning-and-tuning/execution-plans.adoc[Cypher planner] uses statically available information when planning queries to determine whether to use an xref:indexes/search-performance-indexes/index.adoc[index] or not, and this is not possible when using dynamic values.
`MERGE` queries that use dynamic values may not perform as well as those with static values.
Neo4j is actively working to improve the performance of these queries.
The table below outlines performance caveats for specific Neo4j versions.

As a result, `MERGE` queries with dynamic values cannot leverage xref:planning-and-tuning/operators/operators-detail.adoc#leaf-operators[index scans or seeks] and must instead use the xref:planning-and-tuning/operators/operators-detail.adoc#query-plan-all-nodes-scan[`AllNodesScan`] operator, which reads all nodes from the node store and is therefore more costly.

To circumvent possible performance issues, place the dynamic labels or relationship types within `ON CREATE` or `ON MATCH` subclauses.

.Parameters
[source, parameters]
----
{
"onMatchLabels": ["Filmmaker", "AwardRecipient"],
"onCreateLabels": ["ScreenWriter", "AwardWinner"]
}
----

.Merge nodes using dynamic values in `ON CREATE` and `ON MATCH` subclauses
[source, cypher]
----
MERGE (n:Person {name: "Greta Gerwig"})
ON MATCH
SET n:$($onMatchLabels)
ON CREATE
SET n:$($onCreateLabels)
RETURN labels(n) AS gretaLabels
----

Because a `Person` node with the `name` "Greta Gerwig" already exists, this query will only `SET` the dynamic labels added to the `ON MATCH` subclause.

.Result
[role="queryresult",options="footer",cols="1*<m"]
.Neo4j versions and performance caveats
[%header,cols="a,5a"]
|===
| gretaLabels
| Neo4j versions | Performance caveat

| ["Person", "Director", "Filmmaker", "AwardRecipient"]
| 5.26 -- 2025.07
| The xref:planning-and-tuning/execution-plans.adoc[Cypher planner] is not able to leverage xref:indexes/search-performance-indexes/index.adoc[indexes] with xref:planning-and-tuning/operators/operators-detail.adoc#leaf-operators[index scans or seeks] and must instead utilize the xref:planning-and-tuning/operators/operators-detail.adoc#query-plan-all-nodes-scan[`AllNodesScan`] operator, which reads all nodes from the node store and is therefore more costly.

1+d|Rows: 1
|===
| 2025.08 -- current
| The Cypher planner is able to leverage xref:indexes/search-performance-indexes/using-indexes.adoc#token-lookup-indexes[token lookup indexes] when matching node labels and relationship types dynamically.
This is enabled by the introduction of three new query plan operators:
xref:planning-and-tuning/operators/operators-detail.adoc#query-plan-dynamic-label-node-lookup[`DynamicLabelNodeLookup`], xref:planning-and-tuning/operators/operators-detail.adoc#query-plan-dynamic-directed-relationship-type-lookup[`DynamicDirectedRelationshipTypeLookup`], and xref:planning-and-tuning/operators/operators-detail.adoc#query-plan-dynamic-undirected-relationship-type-lookup[`DynamicUndirectedRelationshipTypeLookup`].
It is not, however, able to use indexes on property values.
For example, `MERGE (n:$(Label) {foo: bar})` will not use any indexes on `n.foo` but can use a `DynamicLabelNodeLookup` on `$(label)`.

|===
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,79 @@ 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.08]]
== Neo4j 2025.08

=== Updated in Cypher 25

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

a|
label:functionality[]
label:updated[]
[source, cypher]
----
MATCH (p:Product) WHERE p.name <> "Coffee"
CALL (p) {
MATCH (p)<-[:BUYS]-(c:Customer)-[:BUYS]->(otherProduct)
RETURN c, otherProduct
NEXT
RETURN count(DISTINCT c) AS customers, 0 AS customersAlsoBuyingCoffee
UNION
FILTER otherProduct.name = "Coffee"
RETURN 0 as customers, count(DISTINCT c) AS customersAlsoBuyingCoffee
NEXT
RETURN max(customers) AS customers, max(customersAlsoBuyingCoffee) AS customersAlsoBuyingCoffee
}
RETURN p.name AS product,
round(toFloat(customersAlsoBuyingCoffee) * 100 / customers, 1) AS percentageOfCustomersAlsoBuyingCoffee
ORDER BY product
----

| `NEXT` now correctly supports aggregations in the context of `UNION` and `CALL`.
For more information, see xref:queries/composed-queries/sequential-queries.adoc#issues-fixes[Sequential queries (`NEXT`) > Known issues and fixes].

a|
label:functionality[]
label:updated[]
[source, cypher]
----
PROFILE
WITH "Person" AS label
MATCH (people:$(label))
RETURN people.name
----

| Cypher can now leverage xref:indexes/search-performance-indexes/using-indexes.adoc#token-lookup-indexes[token lookup indexes] when planning queries with xref:clauses/match.adoc#dynamic-match[dynamic labels and relationship types].
This is enabled by the introduction of three new query plan operators: xref:planning-and-tuning/operators/operators-detail.adoc#query-plan-dynamic-label-node-lookup[`DynamicLabelNodeLookup`], xref:planning-and-tuning/operators/operators-detail.adoc#query-plan-dynamic-directed-relationship-type-lookup[`DynamicDirectedRelationshipTypeLookup`], and xref:planning-and-tuning/operators/operators-detail.adoc#query-plan-dynamic-undirected-relationship-type-lookup[`DynamicUndirectedRelationshipTypeLookup`].
|===

=== New in Cypher 25

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

a|
label:functionality[]
label:new[]
[source, cypher, role="noheader"]
----
MATCH (()-->(n))+
WHERE allReduce(acc = 0, node IN n \| acc + node.x, 6 < acc < 30)
RETURN [i IN n \| i.x] AS sequence
ORDER BY head(n).x, size(n)
----

| New xref:functions/predicate.adoc#functions-allreduce[`allReduce()`] function.
It enables the stepwise evaluation of a value accumulated over a path, allowing for early pruning of paths that do not satisfy a given predicate, and is optimized for path expansions.
|===


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

Expand Down
7 changes: 6 additions & 1 deletion modules/ROOT/pages/functions/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,12 @@ These functions return either true or false for the given arguments.
1.1+| xref::functions/predicate.adoc#functions-all[`all()`]
| `all(variable :: ANY, list :: LIST<ANY>, predicate :: ANY) :: BOOLEAN`
| Returns true if the predicate holds for all elements in the given `LIST<ANY>`.


1.1+| xref::functions/predicate.adoc#functions-allreduce[`allReduce()`]
| `allReduce(accumulator = initial, stepVariable IN list \| reductionFunction, predicate) :: BOOLEAN`
| Returns true if, during the stepwise evaluation of a value across the elements in a given `LIST<ANY>`, the accumulated result satisfies a specified predicate at every step.
Where that list is a group variable defined in a quantified path pattern, it allows for the early pruning of paths that do not satisfy the predicate. label:cypher[Cypher 25 only] label:new[Introduced in Neo4j 2025.08]

1.1+| xref::functions/predicate.adoc#functions-any[`any()`]
| `any(variable :: ANY, list :: LIST<ANY>, predicate :: ANY) :: BOOLEAN`
| Returns true if the predicate holds for at least one element in the given `LIST<ANY>`.
Expand Down
Loading