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
4 changes: 1 addition & 3 deletions modules/ROOT/pages/clauses/clause-composition.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,8 @@ The next section will explore these non-linear composition and write clauses.
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]
====
[NOTE]
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.
Expand Down
2 changes: 0 additions & 2 deletions modules/ROOT/pages/clauses/foreach.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ This means that if you `CREATE` a node variable within a `FOREACH`, you will _no
Within the `FOREACH` parentheses, you can do any of the updating commands -- `SET`, `REMOVE`, `CREATE`, `MERGE`, `DELETE`, and `FOREACH`.

[TIP]
====
If you want to execute an additional `MATCH` for each element in a list then the xref::clauses/unwind.adoc[`UNWIND`] clause would be a more appropriate command.
====

image::graph-foreach-clause.svg[Person nodes connected between themselves via knows relationships,width=600,role=popup]

Expand Down
2 changes: 1 addition & 1 deletion modules/ROOT/pages/clauses/load-csv.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -808,7 +808,7 @@ RETURN DISTINCT file() AS path
|===
====

[TIP]
[NOTE]
`file()` always returns a local path, even when loading remote CSV files.
For remote resources, `file()` returns the temporary local path it was downloaded to.

Expand Down
5 changes: 0 additions & 5 deletions modules/ROOT/pages/clauses/optional-match.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@ The `WHERE` clause is part of the pattern description, and its predicates will b
This matters especially in the case of multiple (`OPTIONAL`) `MATCH` clauses, where it is crucial to put `WHERE` together with the `MATCH` it belongs to.


[TIP]
====
To understand the patterns used in the `OPTIONAL MATCH` clause, read xref::patterns/index.adoc[Patterns].
====

== Example graph

The following graph is used for the examples below:
Expand Down
2 changes: 1 addition & 1 deletion modules/ROOT/pages/clauses/order-by.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ It can also be used as a standalone clause, either on its own or in combination
`ORDER BY` relies on comparisons to sort the output (see xref:values-and-types/ordering-equality-comparison.adoc[] for more details).
You can sort on different values, such as node or relationship properties, IDs, or the result of expressions.

[IMPORTANT]
[NOTE]
Unless `ORDER BY` is used, Neo4j does not guarantee the row order of a query result.


Expand Down
9 changes: 2 additions & 7 deletions modules/ROOT/pages/clauses/remove.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,12 @@
= REMOVE

The `REMOVE` clause is used to remove properties from nodes and relationships, and to remove labels from nodes.

[TIP]
====
For deleting nodes and relationships, see xref::clauses/delete.adoc[`DELETE`].
====
To delete nodes and relationships, use the xref::clauses/delete.adoc[`DELETE`] clause.

[NOTE]
====
Removing labels from a node is an idempotent operation: if you try to remove a label from a node that does not have that label on it, nothing happens.
The query statistics will tell you if something needed to be done or not.
====


== Example graph

Expand Down
5 changes: 1 addition & 4 deletions modules/ROOT/pages/clauses/return.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,7 @@ d|Rows: 1
|===

[TIP]
====
To only return the value of a property, do not not return the full node/relationship.
This will improve performance.
====
It is more performant to return properties rather than the full node or relationship.


[[return-all-elements]]
Expand Down
2 changes: 1 addition & 1 deletion modules/ROOT/pages/clauses/with.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ The `WITH` clause serves multiple purposes in Cypher:
* xref:clauses/with.adoc#ordering-pagination[Order and paginate results]
* xref:clauses/with.adoc#filter-results[Filter results]

[IMPORTANT]
[NOTE]
As of Cypher 25, `WITH` is no longer required as a separator between a write and a read clause.

[[example-graph]]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Cypher contains the following comparison operators:
* `IS NULL`
* `IS NOT NULL`
[TIP]
[NOTE]
For more information about how Cypher orders and compares different value types, see xref:values-and-types/ordering-equality-comparison.adoc[Values and types -> Equality, ordering, and comparison of value types]


Expand Down
8 changes: 3 additions & 5 deletions modules/ROOT/pages/functions/aggregating.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ An aggregating function performs a calculation over a set of values, returning a
Aggregation can be computed over all the matching paths, or it can be further divided by introducing xref:functions/aggregating.adoc#grouping-keys[grouping keys].

[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, visit link:https://neo4j.com/developer/kb/understanding-aggregations-on-zero-rows/[Neo4j Knowledge Base -> Understanding aggregations on zero rows].


== Example graph

Expand Down Expand Up @@ -182,10 +181,9 @@ All the values are collected and returned in a single list:
|===

[TIP]
====
Neo4j maintains a transactional count store for holding count metadata, which can significantly increase the speed of queries using the `count()` function.
For more information about the count store, refer to link:https://neo4j.com/developer/kb/fast-counts-using-the-count-store/[Neo4j Knowledge Base -> Fast counts using the count store].
====


=== Using `count(*)` to return the number of nodes

Expand Down
4 changes: 1 addition & 3 deletions modules/ROOT/pages/functions/load-csv.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,9 @@

LOAD CSV functions can be used to get information about the file that is processed by the xref:clauses/load-csv.adoc[`LOAD CSV`] clause.

[IMPORTANT]
====
[NOTE]
The functions described on this page are only useful when run on a query that uses `LOAD CSV`.
In all other contexts they will always return `null`.
====


[[functions-linenumber]]
Expand Down
9 changes: 3 additions & 6 deletions modules/ROOT/pages/genai-integrations.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,10 @@ See xref:genai-integrations.adoc#ai-providers[] for details of each supported pr
Note that because this argument may contain sensitive data, it is obfuscated in the link:https://neo4j.com/docs/operations-manual/current/monitoring/logging/[query.log].
However, if the function call is misspelled or the query is otherwise malformed, it may be logged without being obfuscated.

[IMPORTANT]
====
[NOTE]
This function sends one API request every time it is called, which may result in a lot of overhead in terms of both network traffic and latency.
If you want to generate many embeddings at once, use xref:genai-integrations.adoc#multiple-embeddings[].
====


Use the `db.create.setNodeVectorProperty` procedure to store an embedding to a node property.

Expand Down Expand Up @@ -126,11 +125,9 @@ This result only shows the first 4 of the 1536 numbers in the embedding.
Use the `genai.vector.encodeBatch` procedure to generate many vector embeddings with a single API request.
This procedure takes a list of resources as an input, and returns the same number of result rows, instead of a single one.

[IMPORTANT]
====
[NOTE]
This procedure attempts to generate embeddings for all supplied resources in a single API request.
Therefore, it is recommended to see the respective provider's documentation for details on, for example, the maximum number of embeddings that can be generated per request.
====

.Signature for `genai.vector.encodeBatch` label:procedure[]
[source,syntax]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ If no index type is specified in the create command a xref:indexes/search-perfor
It is recommended to give the index a name when it is created.
If the index is not explicitly named, it gets an auto-generated name.

[IMPORTANT]
[NOTE]
====
The index name must be unique among both indexes and constraints.
====
Expand All @@ -37,7 +37,7 @@ Index configuration settings can be specified using the `OPTIONS` clause.
However, not all indexes have available configuration settings.
In those cases, nothing needs to be specified and the `OPTIONS` map should be omitted from the query.

[TIP]
[NOTE]
Creating an index requires link:{neo4j-docs-base-uri}/operations-manual/current/authentication-authorization/database-administration/#access-control-database-administration-index[the `CREATE INDEX` privilege].

[NOTE]
Expand Down Expand Up @@ -783,7 +783,7 @@ There already exists a constraint called 'bookRecommendations'.

Listing indexes can be done with `SHOW INDEXES`.

[TIP]
[NOTE]
Listing indexes requires link:{neo4j-docs-base-uri}/operations-manual/current/authentication-authorization/database-administration/#access-control-database-administration-index[the `SHOW INDEX` privilege].

[discrete]
Expand Down Expand Up @@ -1028,7 +1028,7 @@ This means that its default behavior is to throw an error if an attempt is made
With `IF EXISTS`, no error is thrown and nothing happens should the index not exist.
Instead, an informational notification is returned detailing that the index does not exist.

[TIP]
[NOTE]
Dropping an index requires link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/authentication-authorization/database-administration/#access-control-database-administration-index[the `DROP INDEX` privilege].

[discrete]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ The following example first creates a relevant index on the type property for `P
CREATE INDEX range_index_type FOR (n:PointOfInterest) ON (n.type)
----

[TIP]
[NOTE]
If no index type is specified when creating an index, Neo4j will default to create a range index.
For more information about creating indexes, see xref:indexes/search-performance-indexes/managing-indexes.adoc#create-indexes[Create, show, and delete indexes -> CREATE INDEX].

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ If `IF NOT EXISTS` is appended to the command, no error is thrown and nothing ha
Instead, an informational notification is returned showing the existing index which blocks the creation.
The index name can also be given as a parameter, `CREATE FULLTEXT INDEX $name FOR ...`.

[TIP]
[NOTE]
Creating a full-text index requires the link:{neo4j-docs-base-uri}/operations-manual/current/authentication-authorization/database-administration/#access-control-database-administration-index[`CREATE INDEX` privilege].

When creating a full-text index, you need to specify the labels/relationship types and property names it should apply to.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ The index name can also be given as a parameter: `CREATE VECTOR INDEX $name ...`
The index name must be unique among both indexes and constraints. +
A newly created index is not immediately available but is created in the background.

[TIP]
[NOTE]
Creating indexes requires link:{neo4j-docs-base-uri}/operations-manual/current/authentication-authorization/database-administration/#access-control-database-administration-index[the `CREATE INDEX` privilege].

.Create vector index for `Movie` nodes on the `embedding` property
Expand Down Expand Up @@ -262,7 +262,7 @@ For more information about what Java versions are supported by different Neo4j v
To list all vector indexes in a database, use the `SHOW VECTOR INDEXES` command.
This is the same xref:indexes/search-performance-indexes/managing-indexes.adoc#list-indexes[`SHOW` command as for other indexes], with the index type filtering on `VECTOR`.

[TIP]
[NOTE]
Listing indexes requires link:{neo4j-docs-base-uri}/operations-manual/current/authentication-authorization/database-administration/#access-control-database-administration-index[the `SHOW INDEX` privilege].

.Show all vector indexes
Expand Down Expand Up @@ -333,7 +333,7 @@ SHOW VECTOR INDEXES YIELD name, type, entityType, labelsOrTypes, properties
A vector index is dropped by using the xref:indexes/search-performance-indexes/managing-indexes.adoc#drop-an-index[same command as for other indexes], `DROP INDEX`.
The index name can also be given as a parameter when dropping an index: `DROP INDEX $name`.

[TIP]
[NOTE]
Dropping indexes requires link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/authentication-authorization/database-administration/#access-control-database-administration-index[the `DROP INDEX` privilege].

.Drop a vector index
Expand Down
6 changes: 3 additions & 3 deletions modules/ROOT/pages/indexes/syntax.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Index configuration settings can be specified using the `OPTIONS` clause.
However, not all indexes have available configuration settings.
In those cases, nothing needs to be specified and the `OPTIONS` map should be omitted from the query.

[TIP]
[NOTE]
Creating an index requires link:{neo4j-docs-base-uri}/operations-manual/current/authentication-authorization/database-administration/#access-control-database-administration-index[the `CREATE INDEX` privilege].

[[create-range-index]]
Expand Down Expand Up @@ -225,7 +225,7 @@ For more information, see xref:indexes/semantic-indexes/vector-indexes.adoc#crea
[[list-index]]
== SHOW INDEX

[TIP]
[NOTE]
Listing indexes requires link:{neo4j-docs-base-uri}/operations-manual/current/authentication-authorization/database-administration/#access-control-database-administration-index[the `SHOW INDEX` privilege].

.List indexes in the database (either all or filtered on index type)
Expand Down Expand Up @@ -303,7 +303,7 @@ This means that its default behavior is to throw an error if an attempt is made
With `IF EXISTS`, no error is thrown and nothing happens should the index not exist.
Instead, an informational notification is returned detailing that the index does not exist.

[TIP]
[NOTE]
Dropping indexes requires link:{neo4j-docs-base-uri}/operations-manual/current/authentication-authorization/database-administration/#access-control-database-administration-index[the `DROP INDEX` privilege].

.Drop an index of any index type
Expand Down
3 changes: 1 addition & 2 deletions modules/ROOT/pages/patterns/primer.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,7 @@ RETURN reduce(acc = 0.0, l IN link | round(acc + l.distance, 2)) AS
1+d|Rows: 2
|===

[TIP]

[NOTE]
`-[:LINK]-+` is a xref:patterns/reference.adoc#quantified-relationships[quantified relationship]. It is composed of a relationship pattern `-[:LINK]-` that matches relationships going in either direction, and a quantifier `+` that means it will match one or more relationships. As no node patterns are included with quantified relationships, they will match any intermediate nodes.

Variable-length paths can also be matched with xref::patterns/variable-length-patterns.adoc#quantified-path-patterns[quantified path patterns], which allow both `WHERE` clauses and accessing the nodes traversed by the path.
Expand Down
2 changes: 1 addition & 1 deletion modules/ROOT/pages/planning-and-tuning/query-tuning.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ Using this option can significantly _increase_ the planning time of the query bu

|===

[IMPORTANT]
[NOTE]
====
The Cypher query option `connectComponentsPlanner` is deprecated and will be removed without a replacement.
The product's default behavior of using a cost-based IDP search algorithm when combining sub-plans will be kept.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ Attempting to run a query with parallel runtime on AuraDB Free will throw the fo
Parallel runtime has been disabled, please enable it or upgrade to a bigger Aura instance.
----

[TIP]
[NOTE]
====
Users of AuraDB Professional, AuraDB Business Critical, and AuraDB Virtual Dedicated Cloud select the the size and the number of available CPUs when creating an instance.
More information about the various tiers of AuraDB can be found on the link:https://neo4j.com/pricing/[Neo4j Pricing page].
Expand Down
5 changes: 2 additions & 3 deletions modules/ROOT/pages/query-caches/unified-query-caches.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,9 @@ but not cache entries.
When this feature is enabled, all databases use only one set of query caches.
A database may store and retrieve entries from the shared cache, but it may not retrieve entries produced by another database.

[IMPORTANT]
====
[NOTE]
While databases use the same set of caches, a database may not observe entries originating from other databases.
====


The database may, however, evict entries from other databases as necessary, according to the constrained cache size and cache eviction policy.
In essence, databases may compete for cache space, but may not observe each other's entries.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ CALL {
} IN TRANSACTIONS
----
[TIP]
[NOTE]
Since the batching is performed on the input rows fed into `CALL { ... } IN TRANSACTIONS`, the data must be supplied from outside the subquery in order for the batching to have an effect.
That is why the nodes are matched in a subquery _preceding_ the one that actually deletes the data.
If the `MATCH` clause were inside the second subquery, the data deletion would run as one single transaction.
Expand Down
8 changes: 2 additions & 6 deletions modules/ROOT/pages/syntax/variables.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,15 @@ RETURN b

The variables are `n` and `b`.

Information regarding the naming of variables may be found xref::syntax/naming.adoc[here].

[IMPORTANT]
.Variables are only visible in the same query part
[NOTE]
====
.Variables are only visible in the same query part
Variables are not carried over to subsequent queries.
If multiple query parts are chained together using `WITH`, variables defined in one part have to be listed in the `WITH` clause to be carried over to the next part.
For more information see xref::clauses/with.adoc[WITH].
====

[IMPORTANT]
.Variables imported into a `CALL` subquery are visible in the whole subquery
====
Even if the subquery consists of multiple query parts chained together using `WITH`, variables imported from the outer query do not have to be listed in a `WITH` clause to be visible in subsequent parts of the subquery.
For more information see xref::subqueries/call-subquery.adoc#variable-scope-clause[The variable scope clause].
====