diff --git a/modules/ROOT/pages/administration/access-control/built-in-roles.adoc b/modules/ROOT/pages/administration/access-control/built-in-roles.adoc index 5a77d2d78..48cdee812 100644 --- a/modules/ROOT/pages/administration/access-control/built-in-roles.adoc +++ b/modules/ROOT/pages/administration/access-control/built-in-roles.adoc @@ -363,7 +363,7 @@ SHOW ROLE admin PRIVILEGES AS COMMANDS a|Rows: 11 |=== -If the built-in `admin` role has been altered or dropped, and needs to be restored to its original state, see link:{neo4j-docs-base-uri}/operations-manual/{page-version}/configuration/password-and-user-recovery[Operations Manual -> Password and user recovery]. +If the built-in `admin` role has been altered or dropped, and needs to be restored to its original state, see link:{neo4j-docs-base-uri}/operations-manual/{page-version}/authentication-authorization/password-and-user-recovery/[Operations Manual -> Password and user recovery]. [[access-control-built-in-roles-admin-recreate]] @@ -415,4 +415,4 @@ GRANT ALL ON DATABASE * TO admin The resulting `admin` role now has the same privileges as the original built-in `admin` role. -Additional information about restoring the `admin` role can be found at link:{neo4j-docs-base-uri}/operations-manual/{page-version}/configuration/password-and-user-recovery#recover-admin-role[Operations Manual -> Recover the admin role]. +Additional information about restoring the `admin` role can be found at link:{neo4j-docs-base-uri}/operations-manual/{page-version}/authentication-authorization/password-and-user-recovery/#recover-admin-role[Operations Manual -> Recover the admin role]. diff --git a/modules/ROOT/pages/clauses/call.adoc b/modules/ROOT/pages/clauses/call.adoc index c6d1ae164..55c427c28 100644 --- a/modules/ROOT/pages/clauses/call.adoc +++ b/modules/ROOT/pages/clauses/call.adoc @@ -50,7 +50,7 @@ Neo4j comes with a number of built-in procedures. For a list of these, see link:{neo4j-docs-base-uri}/operations-manual/{page-version}/reference/procedures[Operations Manual -> Procedures]. Users can also develop custom procedures and deploy to the database. -See link:{neo4j-docs-base-uri}/java-reference/{page-version}/extending-neo4j/procedures#extending-neo4j-procedures[Java Reference -> User-defined procedures] for details. +See link:{neo4j-docs-base-uri}/java-reference/{page-version}/extending-neo4j/procedures/[Java Reference -> User-defined procedures] for details. ==== diff --git a/modules/ROOT/pages/clauses/load-csv.adoc b/modules/ROOT/pages/clauses/load-csv.adoc index 1ff7724ae..a4859cce8 100644 --- a/modules/ROOT/pages/clauses/load-csv.adoc +++ b/modules/ROOT/pages/clauses/load-csv.adoc @@ -383,7 +383,7 @@ RETURN DISTINCT file() AS path ---- Since `LOAD CSV` can temporary download a file to process it, it is important to note that `file()` will always return the path on disk. -If `LOAD CSV` is invoked with a `file:///` URL that points to your disk `file()` will return that same path. +If `LOAD CSV` is invoked with a `\file:///` URL that points to your disk `file()` will return that same path. .Result [queryresult] diff --git a/modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc b/modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc index 413fcda4d..bf133def3 100644 --- a/modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc +++ b/modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc @@ -615,2074 +615,3 @@ New privilege that allows a user to show aliases. Only supported since version 4 |=== - - -[[cypher-deprecations-additions-removals-4.3]] -== Version 4.3 - - -=== Deprecated features - -[cols="2", options="header"] -|=== -| Feature | Details - -a| -label:syntax[] -label:deprecated[] -[source, cypher, role="noheader"] ----- -CREATE CONSTRAINT [name] -ON (node:Label) -ASSERT exists(node.property) ----- -a| Replaced by: -[source, cypher, role="noheader"] ----- -CREATE CONSTRAINT [name] -ON (node:Label) -ASSERT node.property IS NOT NULL ----- - - -a| -label:syntax[] -label:deprecated[] -[source, cypher, role="noheader"] ----- -CREATE CONSTRAINT [name] -ON ()-[rel:REL]-() -ASSERT exists(rel.property) ----- -a| -Replaced by: -[source, cypher, role="noheader"] ----- -CREATE CONSTRAINT [name] -ON ()-[rel:REL]-() -ASSERT rel.property IS NOT NULL ----- - - -a| -label:syntax[] -label:deprecated[] -[source, cypher, role="noheader"] ----- -exists(prop) ----- -a| -Replaced by: -[source, cypher, role="noheader"] ----- -prop IS NOT NULL ----- - - -a| -label:syntax[] -label:deprecated[] -[source, cypher, role="noheader"] ----- -NOT exists(prop) ----- -a| -Replaced by: -[source, cypher, role="noheader"] ----- -prop IS NULL ----- - -a| -label:syntax[] -label:deprecated[] -`BRIEF [OUTPUT]` for `SHOW INDEXES` and `SHOW CONSTRAINTS`. -a| -Replaced by default output columns. - - -a| -label:syntax[] -label:deprecated[] -`VERBOSE [OUTPUT]` for `SHOW INDEXES` and `SHOW CONSTRAINTS`. -a| -Replaced by: -[source, cypher, role="noheader"] ----- -YIELD * ----- - -a| -label:syntax[] -label:deprecated[] -[source, cypher, role="noheader"] ----- -SHOW EXISTS CONSTRAINTS ----- -a| -Replaced by: -[source, cypher, role="noheader"] ----- -SHOW [PROPERTY] EXIST[ENCE] CONSTRAINTS ----- -Still allows `BRIEF` and `VERBOSE` but not `YIELD` or `WHERE`. - - -a| -label:syntax[] -label:deprecated[] -[source, cypher, role="noheader"] ----- -SHOW NODE EXISTS CONSTRAINTS ----- -a| -Replaced by: -[source, cypher, role="noheader"] ----- -SHOW NODE [PROPERTY] EXIST[ENCE] CONSTRAINTS ----- -Still allows `BRIEF` and `VERBOSE` but not `YIELD` or `WHERE`. - - -a| -label:syntax[] -label:deprecated[] -[source, cypher, role="noheader"] ----- -SHOW RELATIONSHIP EXISTS CONSTRAINTS ----- -a| -Replaced by: -[source, cypher, role="noheader"] ----- -SHOW RELATIONSHIP [PROPERTY] EXIST[ENCE] CONSTRAINTS ----- -Still allows `BRIEF` and `VERBOSE` but not `YIELD` or `WHERE`. - -a| -label:syntax[] -label:deprecated[] -For privilege commands: -[source, cypher, role="noheader"] ----- -ON DEFAULT DATABASE ----- -a| -Replaced by: -[source, cypher, role="noheader"] ----- -ON HOME DATABASE ----- - - -a| -label:syntax[] -label:deprecated[] -For privilege commands: -[source, cypher, role="noheader"] ----- -ON DEFAULT GRAPH ----- -a| -Replaced by: -[source, cypher, role="noheader"] ----- -ON HOME GRAPH ----- - - -a| -label:syntax[] -label:deprecated[] -[source, cypher, role="noheader"] ----- -MATCH (a) RETURN (a)--() ----- -a| -Pattern expressions producing lists of paths are deprecated, but they can still be used as existence predicates, for example in `WHERE` clauses. - -Instead, use a pattern comprehension: -[source, cypher, role="noheader"] ----- -MATCH (a) RETURN [p=(a)--() \| p] ----- - - -a| -label:procedure[] -label:deprecated[] - -[source, cypher, role="noheader"] ----- -dbms.procedures ----- -a| -Replaced by: -[source, cypher, role="noheader"] ----- -SHOW PROCEDURE[S] -[EXECUTABLE [BY {CURRENT USER \| username}]] -[YIELD ...] -[WHERE ...] -[RETURN ...] ----- - - -a| -label:procedure[] -label:deprecated[] - -[source, cypher, role="noheader"] ----- -dbms.functions ----- -a| -Replaced by: -[source, cypher, role="noheader"] ----- -SHOW [ALL \| BUILT IN \| USER DEFINED] FUNCTION[S] -[EXECUTABLE [BY {CURRENT USER \| username}]] -[YIELD ...] -[WHERE ...] -[RETURN ...] ----- - -|=== - - -=== Updated features - -[cols="2", options="header"] -|=== -| Feature | Details - -a| -label:functionality[] -label:updated[] -[source, cypher, role="noheader"] ----- -SHOW INDEXES WHERE ... ----- -a| -Now allows filtering for: -[source, cypher, role="noheader"] ----- -SHOW INDEXES ----- - - -a| -label:functionality[] -label:updated[] -[source, cypher, role="noheader"] ----- -SHOW CONSTRAINTS WHERE ... ----- -a| -Now allows filtering for: -[source, cypher, role="noheader"] ----- -SHOW CONSTRAINTS ----- - - -a| -label:functionality[] -label:updated[] -[source, cypher, role="noheader"] ----- -SHOW INDEXES YIELD ... -[WHERE ...] -[RETURN ...] ----- -a| -Now allows `YIELD`, `WHERE`, and `RETURN` clauses to `SHOW INDEXES` to change the output. - - -a| -label:functionality[] -label:updated[] -[source, cypher, role="noheader"] ----- -SHOW CONSTRAINTS YIELD ... -[WHERE ...] -[RETURN ...] ----- -a| -Now allows `YIELD`, `WHERE`, and `RETURN` clauses to `SHOW CONSTRAINTS` to change the output. - - -a| -label:syntax[] -label:updated[] -[source, cypher, role="noheader"] ----- -SHOW [PROPERTY] EXIST[ENCE] CONSTRAINTS ----- -a| -New syntax for filtering `SHOW CONSTRAINTS` on property existence constraints. -Allows `YIELD` and `WHERE` but not `BRIEF` or `VERBOSE`. - - -a| -label:syntax[] -label:updated[] -[source, cypher, role="noheader"] ----- -SHOW NODE [PROPERTY] EXIST[ENCE] CONSTRAINTS ----- -a| -New syntax for filtering `SHOW CONSTRAINTS` on node property existence constraints. -Allows `YIELD` and `WHERE` but not `BRIEF` or `VERBOSE`. - - -a| -label:syntax[] -label:updated[] -[source, cypher, role="noheader"] ----- -SHOW REL[ATIONSHIP] [PROPERTY] EXIST[ENCE] CONSTRAINTS ----- -a| -New syntax for filtering `SHOW CONSTRAINTS` on relationship property existence constraints. -Allows `YIELD` and `WHERE` but not `BRIEF` or `VERBOSE`. - - -a| -label:functionality[] -label:updated[] -[source, cypher, role="noheader"] ----- -SHOW FULLTEXT INDEXES ----- -a| -Now allows easy filtering for `SHOW INDEXES` on fulltext indexes. -Allows `YIELD` and `WHERE` but not `BRIEF` or `VERBOSE`. - - -a| -label:functionality[] -label:updated[] -[source, cypher, role="noheader"] ----- -SHOW LOOKUP INDEXES ----- -a| -Now allows easy filtering for `SHOW INDEXES` on token lookup indexes. -Allows `YIELD` and `WHERE` but not `BRIEF` or `VERBOSE`. - -|=== - - -=== New features - -[cols="2", options="header"] -|=== -| Feature | Details - -a| -label:syntax[] -label:new[] -[source, cypher, role="noheader"] ----- -CREATE DATABASE ... -[OPTIONS {...}] ----- -a| -New syntax to pass options to `CREATE DATABASE`. -This can be used to specify a specific cluster node to seed data from. - - -a| -label:syntax[] -label:new[] -[source, cypher, role="noheader"] ----- -CREATE CONSTRAINT [name] -ON (node:Label) -ASSERT node.property IS NOT NULL ----- -a| -New syntax for creating node property existence constraints. - - -a| -label:syntax[] -label:new[] -[source, cypher, role="noheader"] ----- -CREATE CONSTRAINT [name] -ON ()-[rel:REL]-() -ASSERT rel.property IS NOT NULL ----- -a| -New syntax for creating relationship property existence constraints. - - -a| -label:syntax[] -label:new[] -[source, cypher, role="noheader"] ----- -ALTER USER name IF EXISTS ... ----- -a| -Makes altering users idempotent. -If the specified name does not exists, no error is thrown. - - -a| -label:syntax[] -label:new[] -[source, cypher, role="noheader"] ----- -ALTER USER ... -SET HOME DATABASE ... ----- -a| -Now allows setting home database for user. - - -a| -label:syntax[] -label:new[] -[source, cypher, role="noheader"] ----- -ALTER USER ... -REMOVE HOME DATABASE ----- -a| -Now allows removing home database for user. - - -a| -label:syntax[] -label:new[] -[source, cypher, role="noheader"] ----- -CREATE USER ... -SET HOME DATABASE ... ----- -a| -`CREATE USER` now allows setting home database for user. - - -a| -label:syntax[] -label:new[] -[source, cypher, role="noheader"] ----- -SHOW HOME DATABASE ----- -a| -New syntax for showing the home database of the current user. - - -a| -label:syntax[] -label:new[] -New privilege: -[source, cypher, role="noheader"] ----- -SET USER HOME DATABASE ----- -a| -New Cypher command for administering privilege for changing users home database. - - -a| -label:syntax[] -label:new[] -For privilege commands: -[source, cypher, role="noheader"] ----- -ON HOME DATABASE ----- -a| -New syntax for privileges affecting home database. - - -a| -label:syntax[] -label:new[] -For privilege commands: -[source, cypher, role="noheader"] ----- -ON HOME GRAPH ----- -a| -New syntax for privileges affecting home graph. - -a| -label:syntax[] -label:new[] -[source, cypher, role="noheader"] ----- -CREATE FULLTEXT INDEX ... ----- -a| -Allows creating fulltext indexes on nodes or relationships. -They can be dropped by using their name. - -a| -label:functionality[] -label:new[] -[source, cypher, role="noheader"] ----- -CREATE INDEX FOR ()-[r:TYPE]-() ... ----- -a| -Allows creating indexes on relationships with a particular relationship type and property combination. -They can be dropped by using their name. - - -a| -label:functionality[] -label:new[] -[source, cypher, role="noheader"] ----- -CREATE LOOKUP INDEX ... ----- -a| -Create token lookup index for nodes with any labels or relationships with any relationship type. -They can be dropped by using their name. - -a| -label:functionality[] -label:new[] -[source, cypher, role="noheader"] ----- -RENAME ROLE ----- -a| -New Cypher command for changing the name of a role. - - -a| -label:functionality[] -label:new[] -[source, cypher, role="noheader"] ----- -RENAME USER ----- -a| -New Cypher command for changing the name of a user. - - -a| -label:functionality[] -label:new[] -[source, cypher, role="noheader"] ----- -SHOW PROCEDURE[S] -[EXECUTABLE [BY {CURRENT USER \| username}]] -[YIELD ...] -[WHERE ...] -[RETURN ...] ----- -a| -New Cypher commands for listing procedures. - - -a| -label:functionality[] -label:new[] -[source, cypher, role="noheader"] ----- -SHOW [ALL \| BUILT IN \| USER DEFINED] FUNCTION[S] -[EXECUTABLE [BY {CURRENT USER \| username}]] -[YIELD ...] -[WHERE ...] -[RETURN ...] ----- -a| -New Cypher commands for listing functions. - -|=== - - -[[cypher-deprecations-additions-removals-4.2]] -== Version 4.2 - - -=== Deprecated features - -[cols="2", options="header"] -|=== -| Feature | Details - -a| -label:syntax[] -label:deprecated[] -[source, cypher, role="noheader"] ----- -0... ----- -a| -Replaced by `+0o...+`. - - -a| -label:syntax[] -label:deprecated[] -[source, cypher, role="noheader"] ----- -0X... ----- -a| -Only `+0x...+` (lowercase x) is supported. - -a| -label:procedure[] -label:deprecated[] -[source, role="noheader"] ----- -db.createIndex ----- -a| -Replaced by `CREATE INDEX` command. - - -a| -label:procedure[] -label:deprecated[] -[source, role="noheader"] ----- -db.createNodeKey ----- -a| -Replaced by: -[source, cypher, role="noheader"] ----- -CREATE CONSTRAINT ... IS NODE KEY ----- - - -a| -label:procedure[] -label:deprecated[] -[source, role="noheader"] ----- -db.createUniquePropertyConstraint ----- -a| -Replaced by: -[source, cypher, role="noheader"] ----- -CREATE CONSTRAINT ... IS UNIQUE ----- - -a| -label:procedure[] -label:deprecated[] -[source, role="noheader"] ----- -db.indexes ----- -a| -Replaced by: -[source, cypher, role="noheader"] ----- -SHOW INDEXES ----- - - -a| -label:procedure[] -label:deprecated[] -[source, role="noheader"] ----- -db.indexDetails ----- -a| -Replaced by: -[source, cypher, role="noheader"] ----- -SHOW INDEXES YIELD * ----- - - -a| -label:procedure[] -label:deprecated[] -[source, role="noheader"] ----- -db.constraints ----- -a| -Replaced by: -[source, cypher, role="noheader"] ----- -SHOW CONSTRAINTS ----- - - -a| -label:procedure[] -label:deprecated[] -[source, role="noheader"] ----- -db.schemaStatements ----- -a| -Replaced by: -[source, cypher, role="noheader"] ----- -SHOW INDEXES YIELD * ----- -[source, cypher, role="noheader"] ----- -SHOW CONSTRAINTS YIELD * ----- - - -a| -label:syntax[] -label:deprecated[] -[source, cypher, role="noheader"] ----- -CALL { RETURN 1 } ----- -a| -Replaced by: -[source, cypher, role="noheader"] ----- -CALL { RETURN 1 AS one } ----- - -Unaliased expressions are deprecated in subquery `RETURN` clauses. - -|=== - - -=== Updated features - -[cols="2", options="header"] -|=== -| Feature | Details - -a| -label:functionality[] -label:updated[] -[source, cypher, role="noheader"] ----- -SHOW ROLE name PRIVILEGES ----- -a| -Can now handle multiple roles. -[source, cypher, role="noheader"] ----- -SHOW ROLES n1, n2, ... PRIVILEGES ----- - - -a| -label:functionality[] -label:updated[] -[source, cypher, role="noheader"] ----- -SHOW USER name PRIVILEGES ----- -a| -Can now handle multiple users. -[source, cypher, role="noheader"] ----- -SHOW USERS n1, n2, ... PRIVILEGES ----- - - -a| -label:functionality[] -label:updated[] -[source, cypher, role="noheader"] ----- -round(expression, precision) ----- -a| -The `round()` function can now take an additional argument to specify rounding precision. - - -a| -label:functionality[] -label:updated[] -[source, cypher, role="noheader"] ----- -round(expression, precision, mode) ----- -a| -The `round()` function can now take two additional arguments to specify rounding precision and rounding mode. - -|=== - - -=== New features - -[cols="2", options="header"] -|=== -| Feature | Details - -a| -label:functionality[] -label:new[] -[source, cypher, role="noheader"] ----- -SHOW PRIVILEGES [AS [REVOKE] COMMAND[S]] ----- -a| -Privileges can now be shown as Cypher commands. - -a| -label:syntax[] -label:new[] -[source, cypher, role="noheader"] ----- -DEFAULT GRAPH ----- -a| -New optional part of the Cypher commands for xref:administration/access-control/database-administration.adoc[database privileges]. - - -a| -label:syntax[] -label:new[] -[source, cypher, role="noheader"] ----- -0o... ----- -a| -Cypher now interprets literals with prefix `0o` as an octal integer literal. - -a| -label:syntax[] -label:new[] -[source, cypher, role="noheader"] ----- -SET [PLAINTEXT \| ENCRYPTED] PASSWORD ----- -a| -For `CREATE USER` and `ALTER USER`, it is now possible to set (or update) a password when the plaintext password is unknown, but the encrypted password is available. - - -a| -label:functionality[] -label:new[] -New privilege: -[source, cypher, role="noheader"] ----- -EXECUTE ----- -a| -New Cypher commands for administering privileges for executing procedures and user defined functions. -See xref:administration/access-control/dbms-administration.adoc#access-control-dbms-administration-execute[The DBMS `EXECUTE` privileges]. - - -a| -label:syntax[] -label:new[] -[source, cypher, role="noheader"] ----- -CREATE [BTREE] INDEX ... [OPTIONS {...}] ----- -a| -Allows setting index provider and index configuration when creating an index. - - -a| -label:syntax[] -label:new[] -[source, cypher, role="noheader"] ----- -CREATE CONSTRAINT ... IS NODE KEY [OPTIONS {...}] ----- -a| -Allows setting index provider and index configuration for the backing index when creating a node key constraint. - - -a| -label:syntax[] -label:new[] -[source, cypher, role="noheader"] ----- -CREATE CONSTRAINT ... IS UNIQUE [OPTIONS {...}] ----- -a| -Allows setting index provider and index configuration for the backing index when creating a uniqueness constraint. - -a| -label:syntax[] -label:new[] -[source, cypher, role="noheader"] ----- -SHOW CURRENT USER ----- -a| -New Cypher command for showing current logged-in user and roles. - - -a| -label:functionality[] -label:new[] -[source, cypher, role="noheader"] ----- -SHOW [ALL \| BTREE] INDEX[ES] [BRIEF \| VERBOSE [OUTPUT]] ----- -a| -New Cypher commands for listing indexes. - - -a| -label:functionality[] -label:new[] -[source, cypher, role="noheader"] ----- -SHOW [ALL \| UNIQUE \| NODE EXIST[S] \| RELATIONSHIP EXIST[S] \| EXIST[S] \| NODE KEY] CONSTRAINT[S] [BRIEF \| VERBOSE [OUTPUT]] ----- -a| -New Cypher commands for listing constraints. - -a| -label:functionality[] -label:new[] -New privilege: -[source, cypher, role="noheader"] ----- -SHOW INDEX ----- -a| -New Cypher command for administering privilege for listing indexes. - - -a| -label:functionality[] -label:new[] -New privilege: -[source, cypher, role="noheader"] ----- -SHOW CONSTRAINT ----- -a| -New Cypher command for administering privilege for listing constraints. - -|=== - - -[[cypher-deprecations-additions-removals-4.1.3]] -== Version 4.1.3 - - -=== New features - -[cols="2", options="header"] -|=== -| Feature | Details - -a| -label:syntax[] -label:new[] -[source, cypher, role="noheader"] ----- -CREATE INDEX [name] IF NOT EXISTS FOR ... ----- -a| -Makes index creation idempotent. If an index with the name or schema already exists no error will be thrown. - - -a| -label:syntax[] -label:new[] -[source, cypher, role="noheader"] ----- -DROP INDEX name IF EXISTS ----- -a| -Makes index deletion idempotent. If no index with the name exists no error will be thrown. - - -a| -label:syntax[] -label:new[] -[source, cypher, role="noheader"] ----- -CREATE CONSTRAINT [name] IF NOT EXISTS ON ... ----- -a| -Makes constraint creation idempotent. If a constraint with the name or type and schema already exists no error will be thrown. - - -a| -label:syntax[] -label:new[] -[source, cypher, role="noheader"] ----- -DROP CONSTRAINT name IF EXISTS ----- -a| -Makes constraint deletion idempotent. If no constraint with the name exists no error will be thrown. - -|=== - - -[[cypher-deprecations-additions-removals-4.1]] -== Version 4.1 - - -=== Restricted features - -[cols="2", options="header"] -|=== -| Feature | Details - -a| -label:functionality[] -label:restricted[] -[source, cypher, role="noheader"] ----- -REVOKE ... ----- -a| -No longer revokes sub-privileges when revoking a compound privilege, e.g. when revoking `INDEX MANAGEMENT`, any `CREATE INDEX` and `DROP INDEX` privileges will no longer be revoked. - - -a| -label:functionality[] -label:restricted[] -[source, cypher, role="noheader"] ----- -ALL DATABASE PRIVILEGES ----- -a| -No longer includes the privileges `START DATABASE` and `STOP DATABASE`. - -|=== - - -=== Updated features - -[cols="2", options="header"] -|=== -| Feature | Details - -a| -label:procedure[] -label:updated[] -[source, cypher, role="noheader"] ----- -queryId ----- -a| -The `queryId` procedure format has changed, and no longer includes the database name. -For example, `mydb-query-123` is now `query-123`. - -This change affects the procedures: `dbms.listQueries()`, `dbms.listActiveLocks(queryId)`, `dbms.killQueries(queryIds)`, and `dbms.killQuery(queryId)`. - -a| -label:functionality[] -label:updated[] -[source, cypher, role="noheader"] ----- -SHOW PRIVILEGES ----- -a| -The returned privileges are a closer match to the original grants and denies, e.g. if granted `MATCH` the command will show that specific privilege and not the `TRAVERSE` and `READ` privileges. -Added support for `YIELD` and `WHERE` clauses to allow filtering results. - -|=== - - -=== New features - -[cols="2", options="header"] -|=== -| Feature | Details - -a| -label:functionality[] -label:new[] -New role: -[source, cypher, role="noheader"] ----- -PUBLIC ----- -a| -The `PUBLIC` role is automatically assigned to all users, giving them a set of base privileges. - - -a| -label:syntax[] -label:new[] -For privileges: -[source, cypher, role="noheader"] ----- -REVOKE MATCH ----- -a| -The `MATCH` privilege can now be revoked. - - -a| -label:functionality[] -label:new[] -[source, cypher, role="noheader"] ----- -SHOW USERS ----- -a| -New support for `YIELD` and `WHERE` clauses to allow filtering results. - - -a| -label:functionality[] -label:new[] -[source, cypher, role="noheader"] ----- -SHOW ROLES ----- -a| -New support for `YIELD` and `WHERE` clauses to allow filtering results. - - -a| -label:functionality[] -label:new[] -[source, cypher, role="noheader"] ----- -SHOW DATABASES ----- -a| -New support for `YIELD` and `WHERE` clauses to allow filtering results. - - -a| -label:functionality[] -label:new[] + -xref:administration/access-control/database-administration.adoc#access-control-database-administration-transaction[TRANSACTION MANAGEMENT] privileges -a| -New Cypher commands for administering transaction management. - - -a| -label:functionality[] -label:new[] + -DBMS xref:administration/access-control/dbms-administration.adoc#access-control-dbms-administration-user-management[USER MANAGEMENT] privileges -a| -New Cypher commands for administering user management. - - -a| -label:functionality[] -label:new[] + -DBMS xref:administration/access-control/dbms-administration.adoc#access-control-dbms-administration-database-management[DATABASE MANAGEMENT] privileges -a| -New Cypher commands for administering database management. - - -a| -label:functionality[] -label:new[] + -DBMS xref:administration/access-control/dbms-administration.adoc#access-control-dbms-administration-privilege-management[PRIVILEGE MANAGEMENT] privileges -a| -New Cypher commands for administering privilege management. - - -a| -label:functionality[] -label:new[] -[source, cypher, role="noheader"] ----- -ALL DBMS PRIVILEGES ----- -a| -New Cypher command for administering role, user, database and privilege management. - - -a| -label:functionality[] -label:new[] -[source, cypher, role="noheader"] ----- -ALL GRAPH PRIVILEGES ----- -a| -New Cypher command for administering read and write privileges. - - -a| -label:functionality[] -label:new[] -Write privileges -a| -New Cypher commands for administering write privileges. - - -a| -label:functionality[] -label:new[] -[source, cypher, role="noheader"] ----- -ON DEFAULT DATABASE ----- -a| -New optional part of the Cypher commands for xref:administration/access-control/database-administration.adoc[database privileges]. -|=== - - -[[cypher-deprecations-additions-removals-4.0]] -== Version 4.0 - - -=== Removed features - -[cols="2", options="header"] -|=== -| Feature | Details - -a| -label:function[] -label:removed[] -[source, cypher, role="noheader"] ----- -rels() ----- -a| -Replaced by: -[source, cypher, role="noheader"] ----- -relationships() ----- - -See xref::functions/list.adoc#functions-relationships[`relationships()`]. - - -a| -label:function[] -label:removed[] -[source, cypher, role="noheader"] ----- -toInt() ----- -a| -Replaced by: -[source, cypher, role="noheader"] ----- -toInteger() ----- - -See xref::functions/scalar.adoc#functions-tointeger[`toInteger()`]. - - -a| -label:function[] -label:removed[] -[source, cypher, role="noheader"] ----- -lower() ----- -a| -Replaced by: -[source, cypher, role="noheader"] ----- -toLower() ----- - -See xref::functions/string.adoc#functions-tolower[`toLower()`]. - -a| -label:function[] -label:removed[] -[source, cypher, role="noheader"] ----- -upper() ----- -a| -Replaced by: -[source, cypher, role="noheader"] ----- -toUpper() ----- - -See xref::functions/string.adoc#functions-toupper[`toUpper()`]. - -a| -label:function[] -label:removed[] -[source, cypher, role="noheader"] ----- -extract() ----- -a| -Replaced by xref:values-and-types/lists.adoc#cypher-list-comprehension[list comprehension]. - -a| -label:function[] -label:removed[] -[source, cypher, role="noheader"] ----- -filter() ----- -a| -Replaced by xref:values-and-types/lists.adoc#cypher-list-comprehension[list comprehension]. - -a| -label:functionality[] -label:removed[] -For Rule planner: -[source, cypher, role="noheader"] ----- -CYPHER planner=rule ----- -a| -The `RULE` planner was removed in 3.2, but still possible to trigger using `START` or `CREATE UNIQUE` clauses. -Now it is completely removed. - - -a| -label:functionality[] -label:removed[] -Explicit indexes -a| -The removal of the `RULE` planner in 3.2 was the beginning of the end for explicit indexes. -Now they are completely removed, including the removal of the link:https://neo4j.com/docs/cypher-manual/3.5/schema/index/#explicit-indexes-procedures[built-in procedures for Neo4j 3.3 to 3.5]. - - -a| -label:functionality[] -label:removed[] -For compiled runtime: -[source, cypher, role="noheader"] ----- -CYPHER runtime=compiled ----- -a| -Replaced by the new `pipelined` runtime which covers a much wider range of queries. - - -a| -label:clause[] -label:removed[] -[source, cypher, role="noheader"] ----- -CREATE UNIQUE ----- -a| -Running queries with this clause will cause a syntax error. Running with `CYPHER 3.5` will cause a runtime error due to the removal of the rule planner. - - -a| -label:clause[] -label:removed[] -[source, cypher, role="noheader"] ----- -START ----- -a| -Running queries with this clause will cause a syntax error. Running with `CYPHER 3.5` will cause a runtime error due to the removal of the rule planner. - - -a| -label:syntax[] -label:removed[] -[source, cypher, role="noheader"] ----- -MATCH (n)-[:A\|:B\|:C {foo: 'bar'}]-() RETURN n ----- -a| -Replaced by: -[source, cypher, role="noheader"] ----- -MATCH (n)-[:A\|B\|C {foo: 'bar'}]-() RETURN n ----- - -a| -label:syntax[] -label:removed[] -[source, cypher, role="noheader"] ----- -MATCH (n)-[x:A\|:B\|:C]-() RETURN n ----- -a| -Replaced by: -[source, cypher, role="noheader"] ----- -MATCH (n)-[x:A\|B\|C]-() RETURN n ----- - -a| -label:syntax[] -label:removed[] -[source, cypher, role="noheader"] ----- -MATCH (n)-[x:A\|:B\|:C*]-() RETURN n ----- -a| -Replaced by: -[source, cypher, role="noheader"] ----- -MATCH (n)-[x:A\|B\|C*]-() RETURN n ----- - -a| -label:syntax[] -label:removed[] -[source, cypher, role="noheader"] ----- -{parameter} ----- -a| -Replaced by: -[source, cypher, role="noheader"] ----- -$parameter ----- - -See xref::syntax/parameters.adoc[]. - -|=== - - -=== Deprecated features - -[cols="2", options="header"] -|=== -| Feature | Details - -a| -label:syntax[] -label:deprecated[] -[source, cypher, role="noheader"] ----- -MATCH (n)-[rs*]-() RETURN rs ----- -a| -As in Cypher 3.2, this is replaced by: -[source, cypher, role="noheader"] ----- -MATCH p=(n)-[*]-() RETURN relationships(p) AS rs ----- - - -a| -label:syntax[] -label:deprecated[] -[source, cypher, role="noheader"] ----- -CREATE INDEX ON :Label(prop) ----- -a| -Replaced by: -[source, cypher, role="noheader"] ----- -CREATE INDEX FOR (n:Label) ON (n.prop) ----- - - -a| -label:syntax[] -label:deprecated[] -[source, cypher, role="noheader"] ----- -DROP INDEX ON :Label(prop) ----- -a| -Replaced by: -[source, cypher, role="noheader"] ----- -DROP INDEX name ----- - - -a| -label:syntax[] -label:deprecated[] -[source, cypher, role="noheader"] ----- -DROP CONSTRAINT ON (n:Label) ASSERT (n.prop) IS NODE KEY ----- -a| -Replaced by: -[source, cypher, role="noheader"] ----- -DROP CONSTRAINT name ----- - - -a| -label:syntax[] -label:deprecated[] -[source, cypher, role="noheader"] ----- -DROP CONSTRAINT ON (n:Label) ASSERT (n.prop) IS UNIQUE ----- -a| -Replaced by: -[source, cypher, role="noheader"] ----- -DROP CONSTRAINT name ----- - -a| -label:syntax[] -label:deprecated[] -[source, cypher, role="noheader"] ----- -DROP CONSTRAINT ON (n:Label) ASSERT exists(n.prop) ----- -a| -Replaced by: -[source, cypher, role="noheader"] ----- -DROP CONSTRAINT name ----- - -a| -label:syntax[] -label:deprecated[] -[source, cypher, role="noheader"] ----- -DROP CONSTRAINT ON ()-[r:Type]-() ASSERT exists(r.prop) ----- -a| -Replaced by: -[source, cypher, role="noheader"] ----- -DROP CONSTRAINT name ----- - -|=== - - -=== Restricted features - -[cols="2", options="header"] -|=== -| Feature | Details - -a| -label:function[] -label:restricted[] -[source, cypher, role="noheader"] ----- -length() ----- -a| -Restricted to only work on paths. - -See xref::functions/scalar.adoc#functions-length[`length()`]. - - -a| -label:function[] -label:restricted[] -[source, cypher, role="noheader"] ----- -size() ----- -a| -No longer works for paths. -Only works for strings, lists and pattern expressions. - -See xref::functions/scalar.adoc[`size()`]. - -|=== - - -=== Updated features - -[cols="2", options="header"] -|=== -| Feature | Details - -a| -label:syntax[] -label:extended[] -[source, cypher, role="noheader"] ----- -CREATE CONSTRAINT [name] ON ... ----- -a| -The create constraint syntax can now include a name. - -|=== - - -=== New features - -[cols="2", options="header"] -|=== -| Feature | Details - -a| -label:functionality[] -label:new[] -Pipelined runtime: -[source, cypher, role="noheader"] ----- -CYPHER runtime=pipelined ----- -a| -This Neo4j Enterprise Edition only feature involves a new runtime that has many performance enhancements. - - -a| -label:functionality[] -label:new[] + -xref:administration/databases.adoc[Multi-database administration] -a| -New Cypher commands for administering multiple databases. - - -a| -label:functionality[] -label:new[] + -xref:administration/access-control/index.adoc[Access control] -a| -New Cypher commands for administering role-based access control. - - -a| -label:functionality[] -label:new[] + -xref:administration/access-control/manage-privileges.adoc[Fine-grained security] -a| -New Cypher commands for administering dbms, database, graph and sub-graph access control. - - -a| -label:syntax[] -label:new[] -[source, cypher, role="noheader"] ----- -CREATE INDEX [name] FOR (n:Label) ON (n.prop) ----- -a| -New syntax for creating indexes, which can include a name. - - -a| -label:syntax[] -label:new[] -[source, cypher, role="noheader"] ----- -DROP INDEX name ----- -a| -xref::indexes-for-search-performance.adoc#administration-indexes-drop-an-index[New command] for dropping an index by name. - - -a| -label:syntax[] -label:new[] -[source, cypher, role="noheader"] ----- -DROP CONSTRAINT name ----- -a| -xref::constraints/syntax.adoc#administration-constraints-syntax-drop[New command] for dropping a constraint by name, no matter the type. - - -a| -label:clause[] -label:new[] -[source, cypher, role="noheader"] ----- -WHERE EXISTS {...} ----- -a| -Existential sub-queries are sub-clauses used to filter the results of a `MATCH`, `OPTIONAL MATCH`, or `WITH` clause. - - -a| -label:clause[] -label:new[] -[source, cypher, role="noheader"] ----- -USE neo4j ----- -a| -New clause to specify which graph a query, or query part, is executed against. - -|=== - - -[[cypher-deprecations-additions-removals-3.5]] -== Version 3.5 - - -=== Deprecated features - -[cols="2", options="header"] -|=== -| Feature | Details - -a| -label:functionality[] -label:deprecated[] -Compiled runtime: -[source, cypher, role="noheader"] ----- -CYPHER runtime=compiled ----- -a| -The compiled runtime will be discontinued in the next major release. It might still be used for default queries in order to not cause regressions, but explicitly requesting it will not be possible. - - -a| -label:function[] -label:deprecated[] -[source, cypher, role="noheader"] ----- -extract() ----- -a| -Replaced by xref:values-and-types/lists.adoc#cypher-list-comprehension[list comprehension]. - -a| -label:function[] -label:deprecated[] -[source, cypher, role="noheader"] ----- -filter() ----- -a| -Replaced by xref:values-and-types/lists.adoc#cypher-list-comprehension[list comprehension]. -|=== - - -[[cypher-deprecations-additions-removals-3.4]] -== Version 3.4 - -[cols="4", options="header"] -|=== -| Feature | Type | Change | Details -| xref:values-and-types/spatial.adoc[Spatial point types] | Functionality | Amendment | A point -- irrespective of which Coordinate Reference System is used -- can be stored as a property and is able to be backed by an index. Prior to this, a point was a virtual property only. -| xref:functions/spatial.adoc#functions-point-cartesian-3d[point() - Cartesian 3D] | Function | Added | -| xref:functions/spatial.adoc#functions-point-wgs84-3d[point() - WGS 84 3D] | Function | Added | -| xref:functions/scalar.adoc#functions-randomuuid[randomUUID()] | Function | Added | -| xref:values-and-types/temporal.adoc[Temporal types] | Functionality | Added | Supports storing, indexing and working with the following temporal types: Date, Time, LocalTime, DateTime, LocalDateTime and Duration. -| xref:functions/temporal/index.adoc[Temporal functions] | Functionality | Added | Functions allowing for the creation and manipulation of values for each temporal type -- _Date_, _Time_, _LocalTime_, _DateTime_, _LocalDateTime_ and _Duration_. -| xref:syntax/operators.adoc#query-operators-temporal[Temporal operators] | Functionality | Added | Operators allowing for the manipulation of values for each temporal type -- _Date_, _Time_, _LocalTime_, _DateTime_, _LocalDateTime_ and _Duration_. -| xref:functions/string.adoc#functions-tostring[toString()] | Function | Extended | Now also allows temporal values as input (i.e. values of type _Date_, _Time_, _LocalTime_, _DateTime_, _LocalDateTime_ or _Duration_). -|=== - - -[[cypher-deprecations-additions-removals-3.3]] -== Version 3.3 - -[cols="4", options="header"] -|=== -| Feature | Type | Change | Details - -| `START` -| Clause -| Removed -| -As in Cypher 3.2, any queries using the `START` clause will revert back to Cypher 3.1 `planner=rule`. -However, there are link:https://neo4j.com/docs/cypher-manual/3.5/schema/index/#explicit-indexes-procedures[built-in procedures for Neo4j versions 3.3 to 3.5] for accessing explicit indexes. The procedures will enable users to use the current version of Cypher and the cost planner together with these indexes. -An example of this is `+CALL db.index.explicit.searchNodes('my_index', 'email:me*')+`. - -| `CYPHER runtime=slotted` (Faster interpreted runtime) -| Functionality -| Added -| Neo4j Enterprise Edition only. - -| xref::functions/aggregating.adoc#functions-max[`max()`], xref::functions/aggregating.adoc#functions-min[`min()`] -| Function -| Extended -| Now also supports aggregation over sets containing lists of strings and/or numbers, as well as over sets containing strings, numbers, and lists of strings and/or numbers. - -|=== - - -[[cypher-deprecations-additions-removals-3.2]] -== Version 3.2 - -[cols="4", options="header"] -|=== -| Feature | Type | Change | Details - -| `CYPHER planner=rule` (Rule planner) -| Functionality -| Removed -| All queries now use the cost planner. Any query prepended thus will fall back to using Cypher 3.1. - -| `CREATE UNIQUE` -| Clause -| Removed -| Running such queries will fall back to using Cypher 3.1 (and use the rule planner). - -| `START` -| Clause -| Removed -| Running such queries will fall back to using Cypher 3.1 (and use the rule planner). - -a| -[source, cypher, role="noheader"] ----- -MATCH (n)-[rs*]-() RETURN rs ----- -| Syntax -| Deprecated -a| -Replaced by: -[source, cypher, role="noheader"] ----- -MATCH p=(n)-[*]-() RETURN relationships(p) AS rs` ----- - -a| -[source, cypher, role="noheader"] ----- -MATCH (n)-[:A\|:B\|:C {foo: 'bar'}]-() RETURN n ----- -| Syntax -| Deprecated -a| -Replaced by: -[source, cypher, role="noheader"] ----- -MATCH (n)-[:A\|B\| C {foo: 'bar'}]-() RETURN n ----- - -a| -[source, cypher, role="noheader"] ----- -MATCH (n)-[x:A\|:B\|:C]-() RETURN n ----- -| Syntax -| Deprecated -a| -Replaced by: -[source, cypher, role="noheader"] ----- -MATCH (n)-[x:A\|B\|C]-() RETURN n ----- - -a| -[source, cypher, role="noheader"] ----- -MATCH (n)-[x:A\|:B\|:C*]-() RETURN n ----- -| Syntax -| Deprecated -a| -Replaced by: -[source, cypher, role="noheader"] ----- -MATCH (n)-[x:A\|B\|C*]-() RETURN n ----- - -| link:{neo4j-docs-base-uri}/java-reference/{page-version}/extending-neo4j/aggregation-functions#extending-neo4j-aggregation-functions[User-defined aggregation functions] -| Functionality -| Added -| - -| xref::indexes-for-search-performance.adoc[Composite indexes] -| Index -| Added -| - -| xref::constraints/examples.adoc#administration-constraints-node-key[Node Key] -| Index -| Added -| Neo4j Enterprise Edition only. - -| `CYPHER runtime=compiled` (Compiled runtime) -| Functionality -| Added -| Neo4j Enterprise Edition only. - -| xref::functions/list.adoc#functions-reverse-list[`reverse()`] -| Function -| Extended -| Now also allows a list as input. - -| xref::functions/aggregating.adoc#functions-max[`max()`], xref::functions/aggregating.adoc#functions-min[`min()`] -| Function -| Extended -| Now also supports aggregation over a set containing both strings and numbers. - -|=== - - -[[cypher-deprecations-additions-removals-3.1]] -== Version 3.1 - -[cols="4", options="header"] -|=== -| Feature | Type | Change | Details -| `rels()` | Function | Deprecated | Replaced by xref:functions/list.adoc#functions-relationships[relationships()] -| `toInt()` | Function | Deprecated | Replaced by xref:functions/scalar.adoc#functions-tointeger[toInteger()] -| `lower()` | Function | Deprecated | Replaced by xref:functions/string.adoc#functions-tolower[toLower()] -| `upper()` | Function | Deprecated | Replaced by xref:functions/string.adoc#functions-toupper[toUpper()] -| xref:functions/scalar.adoc#functions-toboolean[toBoolean()] | Function | Added | -| xref:values-and-types/maps.adoc#cypher-map-projection[Map projection] | Syntax | Added | -| xref:values-and-types/lists.adoc#cypher-pattern-comprehension[Pattern comprehension] | Syntax | Added | -| link:/docs/java-reference/5/extending-neo4j/functions#extending-neo4j-functions[User-defined functions] | Functionality | Added | -| xref:clauses/call.adoc[CALL\...YIELD\...WHERE] | Clause | Extended | Records returned by `YIELD` may be filtered further using `WHERE` -|=== - - -[[cypher-deprecations-additions-removals-3.0]] -== Version 3.0 - -[cols="4", options="header"] -|=== -| Feature | Type | Change | Details - -a| -[source, cypher, role="noheader"] ----- -has() ----- -| Function -| Removed -a| -Replaced by: -[source, cypher, role="noheader"] ----- -exists() ----- - -See xref::functions/predicate.adoc#functions-exists[`exists()`]. - -a| -[source, cypher, role="noheader"] ----- -str() ----- -| Function -| Removed -a| Replaced by: -[source, cypher, role="noheader"] ----- -toString() ----- - -See xref::functions/string.adoc#functions-tostring[`toString()`]. - -a| -[source, cypher, role="noheader"] ----- -{parameter} ----- -| Syntax -| Deprecated -a| -Replaced by: -[source, cypher, role="noheader"] ----- -$parameter ----- - -See xref::syntax/parameters.adoc[]. - -a| -[source, cypher, role="noheader"] ----- -properties() ----- -| Function -| Added -a| See xref::functions/scalar.adoc#functions-properties[`properties()`]. - -a| -[source, cypher, role="noheader"] ----- -CALL ... [YIELD] ----- -| Clause -| Added -a| See xref::clauses/call.adoc[]. - -| xref::functions/spatial.adoc#functions-point-cartesian-2d[`point()` - Cartesian 2D] -| Function -| Added -| - -| xref::functions/spatial.adoc#functions-point-wgs84-2d[`point()` - WGS 84 2D] -| Function -| Added -| - -a| -[source, cypher, role="noheader"] ----- -distance() ----- -| Function -| Added -a| See xref::functions/spatial.adoc#functions-distance[`distance()`]. - -| link:{neo4j-docs-base-uri}/java-reference/{page-version}/extending-neo4j/procedures#extending-neo4j-procedures[User-defined procedures] -| Functionality -| Added -| - -| xref::functions/string.adoc#functions-tostring[`toString()`] -| Function -| Extended -| Now also allows Boolean values as input. - -|=== - - -[[cypher-compatibility]] -== Compatibility - -[NOTE] -==== -Neo4j’s ability to support multiple older versions of the Cypher language has changed over time. -In versions prior to Neo4j 3.4, the backwards compatibility layer included the Cypher language parser, planner, and runtime. -All supported versions of Cypher ran on the same Neo4j kernel. -However, this changed in Neo4j 3.4 when the runtime was excluded from the compatibility layer. -When you run, e.g. a `CYPHER 3.1` query in Neo4j 3.5, the query is planned with the 3.1 planner, but run with 3.5 runtime and kernel. -The compatibility layer changed again in Neo4j 4.0 and it now includes only the Cypher language parser. -When you run a `CYPHER 3.5` query, e.g., in Neo4j 4.4, Neo4j parses the older language features, but uses the 4.4 planner, runtime, and kernel to plan and run the query. -The primary reason for these changes is the optimizations in the Cypher runtime to allow Cypher queries to perform better. -==== - -Older versions of the language can still be accessed if required. -There are two ways to select which version to use in queries. - -. Setting a version for all queries: -You can configure your database with the configuration parameter `cypher.default_language_version`, and enter which version you'd like to use (see xref::deprecations-additions-removals-compatibility.adoc#cypher-versions[]). -Every Cypher query will use this version, provided the query hasn't explicitly been configured as described in the next item below. - -. Setting a version on a query by query basis: -The other method is to set the version for a particular query. -Prepending a query with `CYPHER 3.5` will execute the query with the version of Cypher included in Neo4j 3.5. - -Below is an example using the older parameter syntax `+{param}+`: - -[source, cypher, role="nocopy,norun"] ----- -CYPHER 3.5 -MATCH (n:Person) -WHERE n.age > {agelimit} -RETURN n.name, n.age ----- - -Without the `CYPHER 3.5` prefix this query would fail with a syntax error. With `CYPHER 3.5` however, it will only generate a warning and still work. - -[WARNING] -==== -In Neo4j {neo4j-version} the Cypher parser understands some older language features, even if they are no longer supported by the Neo4j kernel. -These features result in runtime errors. -See the table at xref::deprecations-additions-removals-compatibility.adoc#cypher-deprecations-additions-removals-4.0[Cypher Version 4.0] for the list of affected features. -==== - - -[[cypher-versions]] -== Supported language versions - -Neo4j {neo4j-version} supports the following versions of the Cypher language: - -* Neo4j Cypher 3.5 -* Neo4j Cypher 4.3 -* Neo4j Cypher 4.4 - -[TIP] -==== -Each release of Neo4j supports a limited number of old Cypher Language Versions. -When you upgrade to a new release of Neo4j, please make sure that it supports the Cypher language version you need. -If not, you may need to modify your queries to work with a newer Cypher language version. -==== diff --git a/modules/ROOT/pages/functions/index.adoc b/modules/ROOT/pages/functions/index.adoc index 8111aa445..99868e87f 100644 --- a/modules/ROOT/pages/functions/index.adoc +++ b/modules/ROOT/pages/functions/index.adoc @@ -750,12 +750,12 @@ There are two main types of functions that can be developed and used: | Scalar | For each row the function takes parameters and returns a result. | xref::functions/user-defined.adoc#query-functions-udf[Using UDF] -| link:{neo4j-docs-base-uri}/java-reference/{page-version}/extending-neo4j/functions#extending-neo4j-functions[Extending Neo4j (UDF)] +| link:{neo4j-docs-base-uri}/java-reference/{page-version}/extending-neo4j/functions[Extending Neo4j (UDF)] | Aggregating | Consumes many rows and produces an aggregated result. | xref::functions/user-defined.adoc#query-functions-user-defined-aggregation[Using aggregating UDF] -| link:{neo4j-docs-base-uri}/java-reference/{page-version}/extending-neo4j/aggregation-functions#extending-neo4j-aggregation-functions[Extending Neo4j (Aggregating UDF)] +| link:{neo4j-docs-base-uri}/java-reference/{page-version}/extending-neo4j/aggregation-functions/[Extending Neo4j (Aggregating UDF)] |=== diff --git a/modules/ROOT/pages/functions/user-defined.adoc b/modules/ROOT/pages/functions/user-defined.adoc index f21f155c9..f39406d2a 100644 --- a/modules/ROOT/pages/functions/user-defined.adoc +++ b/modules/ROOT/pages/functions/user-defined.adoc @@ -17,12 +17,12 @@ There are two main types of functions that can be developed and used: | Scalar | For each row the function takes parameters and returns a result. | xref::functions/user-defined.adoc#query-functions-udf[Using UDF] -| link:{neo4j-docs-base-uri}/java-reference/{page-version}/extending-neo4j/functions#extending-neo4j-functions[Extending Neo4j (UDF)] +| link:{neo4j-docs-base-uri}/java-reference/{page-version}/extending-neo4j/functions/[Extending Neo4j (UDF)] | Aggregating | Consumes many rows and produces an aggregated result. | xref::functions/user-defined.adoc#query-functions-user-defined-aggregation[Using aggregating UDF] -| link:{neo4j-docs-base-uri}/java-reference/{page-version}/extending-neo4j/aggregation-functions#extending-neo4j-aggregation-functions[Extending Neo4j (Aggregating UDF)] +| link:{neo4j-docs-base-uri}/java-reference/{page-version}/extending-neo4j/aggregation-functions[Extending Neo4j (Aggregating UDF)] |=== @@ -32,7 +32,7 @@ There are two main types of functions that can be developed and used: For each incoming row the function takes parameters and returns a single result. -For developing and deploying user-defined functions in Neo4j, see link:{neo4j-docs-base-uri}/java-reference/{page-version}/extending-neo4j/functions#extending-neo4j-functions[Extending Neo4j -> User-defined functions]. +For developing and deploying user-defined functions in Neo4j, see link:{neo4j-docs-base-uri}/java-reference/{page-version}/extending-neo4j/functions/[Extending Neo4j -> User-defined functions]. .Call a user-defined function diff --git a/modules/ROOT/pages/indexes-for-full-text-search.adoc b/modules/ROOT/pages/indexes-for-full-text-search.adoc index 1935fa851..376d0bd73 100644 --- a/modules/ROOT/pages/indexes-for-full-text-search.adoc +++ b/modules/ROOT/pages/indexes-for-full-text-search.adoc @@ -75,15 +75,15 @@ Use the `db.index.fulltext.listAvailableAnalyzers` procedure to see what options And 'fulltext.eventually_consistent' which can be set to 'true' to make this index eventually consistent, such that updates from committing transactions are applied in a background thread. | List available analyzers. -| https://neo4j.com/docs/operations-manual/current/reference/procedures/#procedure_db_index_fulltext_listavailableanalyzers[`db.index.fulltext.listAvailableAnalyzers`] +| https://neo4j.com/docs/operations-manual/4.4/reference/procedures/#procedure_db_index_fulltext_listavailableanalyzers[`db.index.fulltext.listAvailableAnalyzers`] | List the available analyzers that the full-text indexes can be configured with. | Use full-text node index. -| https://neo4j.com/docs/operations-manual/current/reference/procedures/#procedure_db_index_fulltext_querynodes[`db.index.fulltext.queryNodes`] +| https://neo4j.com/docs/operations-manual/4.4/reference/procedures/#procedure_db_index_fulltext_querynodes[`db.index.fulltext.queryNodes`] | Query the given full-text index. Returns the matching nodes and their Lucene query score, ordered by score. | Use full-text relationship index. -| https://neo4j.com/docs/operations-manual/current/reference/procedures/#procedure_db_index_fulltext_queryrelationships[`db.index.fulltext.queryRelationships`] +| https://neo4j.com/docs/operations-manual/4.4/reference/procedures/#procedure_db_index_fulltext_queryrelationships[`db.index.fulltext.queryRelationships`] | Query the given full-text index. Returns the matching relationships and their Lucene query score, ordered by score. | Drop full-text index. @@ -91,7 +91,7 @@ And 'fulltext.eventually_consistent' which can be set to 'true' to make this ind | Drop the specified index. | Eventually consistent indexes. -| https://neo4j.com/docs/operations-manual/current/reference/procedures/#procedure_db_index_fulltext_awaiteventuallyconsistentindexrefresh[`db.index.fulltext.awaitEventuallyConsistentIndexRefresh`] +| https://neo4j.com/docs/operations-manual/4.4/reference/procedures/#procedure_db_index_fulltext_awaiteventuallyconsistentindexrefresh[`db.index.fulltext.awaitEventuallyConsistentIndexRefresh`] | Wait for the updates from recently committed transactions to be applied to any eventually-consistent full-text indexes. | Listing all fulltext indexes. diff --git a/modules/ROOT/pages/introduction/cypher-aura.adoc b/modules/ROOT/pages/introduction/cypher-aura.adoc index ca564c529..feb9d58a8 100644 --- a/modules/ROOT/pages/introduction/cypher-aura.adoc +++ b/modules/ROOT/pages/introduction/cypher-aura.adoc @@ -36,7 +36,7 @@ For example, it is not possible to create, alter, or drop databases using Aura, Additionally, some Cypher features are exclusive to AuraDB Business Critical and AuraDB Virtual Dedicated Cloud tiers. These primarily fall under database administration and role-based access control capabilities. -For more information, see the link:{neo4j-docs-base-uri}/operations-manual/{page-version}/database-administration/[Operations Manual -> Database administration] and the link:{neo4j-docs-base-uri}/operations-manual/{page-version}/authentication-authorization/[Operations Manual -> Authentication and authorization]. +For more information, see the chapter about xref:administration/index.adoc[Administration]. == Aura and the Cypher Cheat Sheet diff --git a/modules/ROOT/pages/introduction/cypher-neo4j.adoc b/modules/ROOT/pages/introduction/cypher-neo4j.adoc index 505975d5e..65c682403 100644 --- a/modules/ROOT/pages/introduction/cypher-neo4j.adoc +++ b/modules/ROOT/pages/introduction/cypher-neo4j.adoc @@ -116,8 +116,8 @@ Explicit transactions cannot be managed directly from queries, they must be mana For examples of the API, or the commands used to start and commit transactions, refer to the API or tool-specific documentation: * For information on using transactions with a Neo4j driver, see _The session API_ in the link:{docs-base-uri}[Neo4j Driver manuals]. -* For information on using transactions over the HTTP API, see the link:{neo4j-docs-base-uri}/http-api/{page-version}/actions#http-api-actions[HTTP API documentation -> Using the HTTP API]. -* For information on using transactions within the embedded Core API, see the link:{neo4j-docs-base-uri}/java-reference/{page-version}/java-embedded/cypher-java#cypher-java[Java Reference -> Executing Cypher queries from Java]. +* For information on using transactions over the HTTP API, see the link:{neo4j-docs-base-uri}/http-api/{page-version}/actions/[HTTP API documentation -> Cypher transaction API]. +* For information on using transactions within the embedded Core API, see the link:{neo4j-docs-base-uri}/java-reference/{page-version}/java-embedded/cypher-java[Java Reference -> Cypher queries]. * For information on using transactions within the Neo4j Browser or Cypher-shell, see the link:{neo4j-docs-base-uri}/browser-manual/current/reference-commands/[Neo4j Browser documentation] or the link:{neo4j-docs-base-uri}/operations-manual/{page-version}/tools/cypher-shell/#cypher-shell-commands[Cypher-shell documentation]. When writing procedures or using Neo4j embedded, remember that all iterators returned from an execution result should be either fully exhausted or closed. diff --git a/modules/ROOT/pages/introduction/cypher-tutorial.adoc b/modules/ROOT/pages/introduction/cypher-tutorial.adoc index fbce0078d..90627ccab 100644 --- a/modules/ROOT/pages/introduction/cypher-tutorial.adoc +++ b/modules/ROOT/pages/introduction/cypher-tutorial.adoc @@ -3,7 +3,7 @@ :description: This section provides an overview of Cypher, and goes through a short Cypher tutorial based on the Neo4j movie database. In this short tutorial, users will learn how to create, query, and delete a property graph database using Cypher. -The tutorial uses the xref:https://github.com/neo4j-graph-examples/movies/tree/main/documentation[Neo4j movie database]. +The tutorial uses the link:https://github.com/neo4j-graph-examples/movies/tree/main/documentation[Neo4j movie database]. == Creating a data model diff --git a/modules/ROOT/pages/introduction/neo4j-databases-graphs.adoc b/modules/ROOT/pages/introduction/neo4j-databases-graphs.adoc deleted file mode 100644 index 57cfaff5d..000000000 --- a/modules/ROOT/pages/introduction/neo4j-databases-graphs.adoc +++ /dev/null @@ -1,101 +0,0 @@ -:description: This section describes databases and graphs in Neo4j. - -[[neo4j-databases-graphs]] -= Neo4j databases and graphs - -[abstract] --- -This section describes databases and graphs in Neo4j. --- - -Cypher queries are executed against a Neo4j database, but normally apply to specific graphs. -It is important to understand the meaning of these terms and exactly when a graph is not a database. - -DBMS:: -A Neo4j Database Management System is capable of containing and managing multiple graphs contained in databases. -Client applications will connect to the DBMS and open sessions against it. -A client session provides access to any graph in the DBMS. - -Graph:: -This is a data model within a database. -Normally there is only one graph within each database, and many xref::introduction/quering-updating-administering.adoc[administrative] commands that refer to a specific graph do so using the database name. -+ -Cypher queries executed in a session may declare which graph they apply to, or use a default, given by the session. -+ -In Neo4j Fabric it is possible to refer to multiple graphs within the same query. - -Database:: -A database is a storage and retrieval mechanism for collecting data in a defined space on disk and in memory. - -Most of the time Cypher queries are reading or updating queries, which are run against a graph. -There are also administrative commands that apply to a database, or to the entire DBMS. -Administrative commands cannot be run in a session connected to a normal user database, but instead need to be run within a session connected to the _system_ database. - -== The system database and the default database - -All Neo4j servers contain a built-in database called `system`, which behaves differently than all other databases. -The `system` database stores system data and you can not perform graph queries against it. - -A fresh installation of Neo4j includes two databases: - -* `system` - the system database described above, containing meta-data on the DBMS and security configuration. -* `neo4j` - the default database, named using the config option `dbms.default_database=neo4j`. - -For more information about the _system_ database, see the sections on xref::/administration/databases.adoc[Database management] and xref::administration/access-control/index.adoc[Access control]. - -== Different editions of Neo4j - -Neo4j has two editions, a commercial Enterprise Edition with additional performance and administrative features, and an open-source Community Edition. -Cypher works almost identically between the two editions, and as such most of this manual will not differentiate between them. -In the few cases where there is a difference in Cypher language support or behaviour between editions, these are highlighted as described below in xref::introduction/neo4j-databases-graphs.adoc#cypher-limited-support[]. - -However it is worth listing up-front the key areas that are not supported in the open-source edition: - -[options="header"] -|=== -| Feature | Enterprise | Community - -| xref::administration/databases.adoc[Multi-database] -a| -Any number of user databases. -a| -Only `system` and one user database. - -| Role-based security -a| -User, role, and privilege management for flexible xref::administration/access-control/index.adoc[access control] and xref::administration/access-control/manage-privileges.adoc[sub-graph access control]. -a| -xref::administration/access-control/manage-users.adoc[Multi-user management]. -All users have full access rights. - -| Constraints -a| -xref::constraints/examples.adoc#administration-constraints-prop-exist-nodes[Existence constraints], xref::constraints/examples.adoc#administration-constraints-unique-nodes[uniqueness constraints], and xref::constraints/examples.adoc#administration-constraints-node-key[`NODE KEY` constraints]. -a| -Only xref::constraints/examples.adoc#administration-constraints-unique-nodes[uniqueness constraints]. - -|=== - - -[[cypher-limited-support]] -== Limited Support Features - -Some elements of Cypher do not work in all deployments of Neo4j. - -Specific labels are added to the documentation to highlight these cases. - -[options="header"] -|=== -| Description | Label - -| This feature has been deprecated and will be removed or replaced in the future. -| label:deprecated[] - -| This feature only works in the enterprise edition of Neo4j. -| label:enterprise-edition[] - -| This feature only works in a fabric deployment of Neo4j. -| label:fabric[] - -|=== - diff --git a/modules/ROOT/pages/introduction/quering-updating-administering.adoc b/modules/ROOT/pages/introduction/quering-updating-administering.adoc deleted file mode 100644 index 590096037..000000000 --- a/modules/ROOT/pages/introduction/quering-updating-administering.adoc +++ /dev/null @@ -1,79 +0,0 @@ -:description: This section describes using Cypher for both querying and updating your graph, as well as administering graphs and databases. -[[cypher-querying-updating-administering]] -= Querying, updating and administering - -[abstract] --- -This section describes using Cypher for both querying and updating your graph, as well as administering graphs and databases. --- - -In the introduction we described the common case of using Cypher to perform read-only queries of the graph. -However, it is also possible to use Cypher to perform updates to the graph, import data into the graph, and perform administrative actions on graphs, databases and the entire DBMS. - -All these various options are described in more detail in later sections, but it is worth summarizing a few key points first. - -[[cypher-admin-queries]] -== The structure of administrative queries - -Cypher administrative queries cannot be combined with normal reading and writing queries. -Each administrative query will perform either an update action to the `system` or a read of status information from the `system`. -Some administrative commands make changes to a specific database, and will therefore be possible to run only when connected to the database of interest. -Others make changes to the state of the entire DBMS and can only be run against the special `system` database. - - -[[cypher-updating-queries]] -== The structure of update queries - - -If you read from the graph and then update the graph, your query implicitly has two parts -- the reading is the first part, and the writing is the second part. - -[NOTE] -==== -A Cypher query part can either read and match on the graph, or make updates on it, not both simultaneously. -==== - -If your query only performs reads, Cypher will not actually match the pattern until you ask for the results. -In an updating query, the semantics are that _all_ the reading will be done before any writing is performed. - -The only pattern where the query parts are implicit is when you first read and then write -- any other order and you have to be explicit about your query parts. -The parts are separated using the `WITH` statement. -`WITH` is like an event horizon -- it's a barrier between a plan and the finished execution of that plan. - -When you want to filter using aggregated data, you have to chain together two reading query parts -- the first one does the aggregating, and the second filters on the results coming from the first one. - -[source, cypher, indent=0] ----- -MATCH (n {name: 'John'})-[:FRIEND]-(friend) -WITH n, count(friend) AS friendsCount -WHERE friendsCount > 3 -RETURN n, friendsCount ----- - -Using `WITH`, you specify how you want the aggregation to happen, and that the aggregation has to be finished before Cypher can start filtering. - -Here's an example of updating the graph, writing the aggregated data to the graph: - -[source, cypher, indent=0] ----- -MATCH (n {name: 'John'})-[:FRIEND]-(friend) -WITH n, count(friend) AS friendsCount -SET n.friendsCount = friendsCount -RETURN n.friendsCount ----- - -You can chain together as many query parts as the available memory permits. - - -[[cypher-returning-data]] -== Returning data - -Any query can return data. -If a query only reads, it has to return data. -If a read-query doesn't return any data, it serves no purpose, and is therefore not a valid Cypher query. -Queries that update the graph don't have to return anything, but they can. - -After all the parts of the query comes one final `RETURN` clause. -`RETURN` is not part of any query part -- it is a period symbol at the end of a query. -The `RETURN` clause has three sub-clauses that come with it: `SKIP`/`LIMIT` and `ORDER BY`. - -If you return nodes or relationships from a query that has just deleted them -- beware, you are holding a pointer that is no longer valid. diff --git a/modules/ROOT/pages/introduction/transactions.adoc b/modules/ROOT/pages/introduction/transactions.adoc deleted file mode 100644 index 44862f0c9..000000000 --- a/modules/ROOT/pages/introduction/transactions.adoc +++ /dev/null @@ -1,69 +0,0 @@ -:description: This section describes how Cypher queries work with database transactions. - -[[query-transactions]] -= Transactions - -[abstract] --- -This section describes how Cypher queries work with database transactions. --- - -All Cypher queries run within transactions. -Modifications done by updating queries are held in memory by the transaction until it is committed, at which point the changes are persisted to disk and become visible to other transactions. -If an error occurs - either during query evaluation, such as division by zero, or during commit, such as constraint violations - the transaction is automatically rolled back, and no changes are persisted in the graph. - -In short, an updating query always either fully succeeds, or does not succeed at all. - -[NOTE] -==== -A query that makes a large number of updates consequently uses large amounts of memory since the transaction holds changes in memory. -For memory configuration in Neo4j, see the link:{neo4j-docs-base-uri}/operations-manual/{page-version}/performance/memory-configuration[Neo4j Operations Manual -> Memory configuration]. -==== - -Transactions can be either _explicit_ or _implicit_. - -- _Explicit_ transactions: - * Are opened by the user. - * Can execute multiple Cypher queries in sequence. - * Are committed, or rolled back, by the user. - -- _Implicit_ transactions, sometimes called auto-commit transactions or `:auto` transactions: - * Are opened automatically. - * Can execute a single Cypher query. - * Are committed automatically when the query finishes successfully. - -Queries that start separate transactions themselves, such as queries using xref::clauses/call-subquery.adoc#subquery-call-in-transactions[`CALL { ... } IN TRANSACTIONS`] or xref::query-tuning/using.adoc#query-using-periodic-commit-hint[`PERIODIC COMMIT`] are only allowed in _implicit_ mode. - -For examples of the API's used to start and commit transactions, refer to the API specific documentation: - -* For information on using transactions with a Neo4j driver, see _The session API_ in the link:{docs-base-uri}[Neo4j Driver manuals]. -* For information on using transactions over the HTTP API, see the link:{neo4j-docs-base-uri}/http-api/{page-version}/actions#http-api-actions[HTTP API documentation -> Using the HTTP API]. -* For information on using transactions within the embedded Core API, see the link:{neo4j-docs-base-uri}/java-reference/{page-version}/java-embedded/cypher-java#cypher-java[Java Reference -> Executing Cypher queries from Java]. - -When writing procedures or using Neo4j embedded, remember that all iterators returned from an execution result should be either fully exhausted or closed. -This ensures that the resources bound to them are properly released. - - -[[dbms-transactions]] -== DBMS Transactions - -Beginning a transaction while connected to a DBMS will start a DBMS-level transaction. -A DBMS-level transaction is a container for database transactions. - -A database transaction is started when the first query to a specific database is issued. -Database transactions opened inside a DBMS-level transaction are committed or rolled back when the DBMS-level transaction is committed or rolled back. - -For an example of how queries to multiple databases can be issued in one transaction, see _Databases and execution context_ in the link:{docs-base-uri}[Neo4j Driver manuals]. - -DBMS transactions have the following limitations: - -* Only one database can be written to in a DBMS transaction -* Cypher operations fall into the following main categories: - -** Operations on graphs. -** Schema commands. -** Administration commands. - -+ -It is not possible to combine any of these workloads in a single DBMS transaction. - diff --git a/modules/ROOT/pages/introduction/uniqueness.adoc b/modules/ROOT/pages/introduction/uniqueness.adoc deleted file mode 100644 index 895b9b1bb..000000000 --- a/modules/ROOT/pages/introduction/uniqueness.adoc +++ /dev/null @@ -1,205 +0,0 @@ -:description: Cypher path matching uses relationship isomorphism, the same relationship cannot be returned more than once in the same result record. - -[[cypher-result-uniqueness]] -= Cypher path matching - -[abstract] --- -Cypher path matching uses relationship isomorphism, the same relationship cannot be returned more than once in the same result record. --- - -**Neo4j Cypher** makes use of **relationship isomorphism** for path matching and is a very effective way of reducing the result set size and preventing infinite traversals. - -[NOTE] -==== -In Neo4j, all relationships have a direction. -However, you can have the notion of undirected relationships at query time. -==== - -In the case of variable length pattern expressions, it is particularly important to have a constraint check, or an infinite number of result records could be found. - -To understand this better, let us consider a few alternative options: - -Homomorphism:: -No constraints for path matching. - -Node isomorphism:: -The same node cannot be returned more than once for each path matching record. - -Relationship isomorphism:: -The same relationship cannot be returned more than once for each path matching record. -Cypher makes use of relationship isomorphism for path matching. - - -== Homomorphism - -**Constraints:** No constraints for path matching. - - -.Homomorphism -==== -The graph is composed of only two nodes `(a)` and `(b)`, connected by one relationship, `+(a:Node)-[r:R]->(b:Node)+`. - -If the query is looking for paths of length `n` and do not care about the direction, a path of length `n` will be returned repeating the two nodes over and over. - -For example, find all paths with 5 relationships and do not care about the relationship direction: - -[source, role=noheader, indent=0] ----- -MATCH p = ()-[*5]-() -RETURN nodes(p) ----- - -This will return the two resulting records if *homomorphism* was used, `[a,b,a,b,a,b]`, as well as `[b,a,b,a,b,a]`. -==== - - -== Node isomorphism - -**Constraints:** The same node cannot be returned more than once for each path matching record. - -In another two-node example, such as `+(a:Node)-[r:R]->(b:Node)+`; only paths of length 1 can be found with the node isomorphism constraint. - - -.Node isomorphism -==== -The graph is composed of only two nodes `(a)` and `(b)`, connected by one relationship, `+(a:Node)-[r:R]->(b:Node)+`. - -[source, role=noheader, indent=0] ----- -MATCH p = ()-[*1]-() -RETURN nodes(p) ----- - -This will return the two resulting records if *node isomorphism* was used, `[a, b]`, as well as `[b, a]`. -==== - - -== Relationship isomorphism - -**Constraints:** The same relationship cannot be returned more than once for each path matching record. - -In another two-node example, such as `+(a:Node)-[r:R]->(b:Node)+`; only paths of length 1 can be found with the relationship isomorphism constraint. - - -.Relationship isomorphism -==== -The graph is composed of only two nodes `(a)` and `(b)`, connected by one relationship, `+(a:Node)-[r:R]->(b:Node)+`. - -[source, cypher, role=noplay, indent=0] ----- -MATCH p = ()-[*1]-() -RETURN nodes(p) ----- - -This will return the two resulting records `[a, b]`, as well as `[b, a]`. -==== - - -== Cypher path matching example - -Cypher makes use of relationship isomorphism for path matching. - - -.Friend of friends -==== -Looking for a user's friends of friends should not return said user. - -To demonstrate this, let's create a few nodes and relationships: - -**Query 1, create data.** - -[source, cypher, role=noplay, indent=0] ----- -CREATE - (adam:User {name: 'Adam'}), - (pernilla:User {name: 'Pernilla'}), - (david:User {name: 'David'}), - (adam)-[:FRIEND]->(pernilla), - (pernilla)-[:FRIEND]->(david) ----- - -[source, role=noheader, indent=0] ----- -Nodes created: 3 -Relationships created: 2 -Properties set: 3 ----- - -Which gives us the following graph: - -image::graph2.svg[] - -Now let's look for friends of friends of Adam: - -**Query 2, friend of friends of Adam.** - -[source, cypher, role=noplay, indent=0] ----- -MATCH (user:User {name: 'Adam'})-[r1:FRIEND]-()-[r2:FRIEND]-(friend_of_a_friend) -RETURN friend_of_a_friend.name AS fofName ----- - -[source, role=noheader, indent=0] ----- -Rows: 1 - -+---------+ -| fofName | -+---------+ -| "David" | -+---------+ ----- - -In this query, Cypher makes sure to not return matches where the pattern relationships `r1` and `r2` point to the same graph relationship. - -This is however not always desired. -If the query should return the user, it is possible to spread the matching over multiple `MATCH` clauses, like so: - -**Query 3, multiple MATCH clauses.** - -[source, cypher, role=noplay, indent=0] ----- -MATCH (user:User {name: 'Adam'})-[r1:FRIEND]-(friend) -MATCH (friend)-[r2:FRIEND]-(friend_of_a_friend) -RETURN friend_of_a_friend.name AS fofName ----- - -[source, role=noheader, indent=0] ----- -Rows: 2 - -+---------+ -| fofName | -+---------+ -| "David" | -| "Adam" | -+---------+ ----- - -Note that while the following **Query 4** looks similar to **Query 3**, it is actually equivalent to **Query 2**. - -**Query 4, equivalent to query 2.** - -[source, cypher, role=noplay, indent=0] ----- -MATCH - (user:User {name: 'Adam'})-[r1:FRIEND]-(friend), - (friend)-[r2:FRIEND]-(friend_of_a_friend) -RETURN friend_of_a_friend.name AS fofName ----- - -Here, the `MATCH` clause has a single pattern with two paths, while the previous query has two distinct patterns. - -[source, role=noheader, indent=0] ----- -Rows: 1 - -+---------+ -| fofName | -+---------+ -| "David" | -+---------+ ----- - -==== diff --git a/modules/ROOT/pages/syntax/operators.adoc b/modules/ROOT/pages/syntax/operators.adoc index 1dc1567a2..6e1d6d1c0 100644 --- a/modules/ROOT/pages/syntax/operators.adoc +++ b/modules/ROOT/pages/syntax/operators.adoc @@ -401,7 +401,7 @@ For example, `1 > b` and `1 < b` are both false when b is NaN. * *Ordering* of spatial values: ** `ORDER BY` requires all values to be orderable. ** Points are ordered after arrays and before temporal types. - ** Points of different CRS are ordered by the CRS code (the value of SRID field). For the currently supported set of xref::values-and-types/spatial.adoc#cypher-spatial-crs[Coordinate Reference Systems] this means the order: 4326, 4979, 7302, 9157 + ** Points of different CRS are ordered by the CRS code (the value of SRID field). For the currently supported set of xref::values-and-types/spatial.adoc#spatial-values-crs[Coordinate Reference Systems] this means the order: 4326, 4979, 7302, 9157 ** Points of the same CRS are ordered by each coordinate value in turn, `x` first, then `y` and finally `z`. ** Note that this order is different to the order returned by the spatial index, which will be the order of the space filling curve. * *Comparison* of temporal values: diff --git a/modules/ROOT/pages/values-and-types/spatial.adoc b/modules/ROOT/pages/values-and-types/spatial.adoc index 93f09fa2b..2ffaef0b3 100644 --- a/modules/ROOT/pages/values-and-types/spatial.adoc +++ b/modules/ROOT/pages/values-and-types/spatial.adoc @@ -26,7 +26,7 @@ Values with the `Point` type have the following characteristics: * Each point can have either 2 or 3 dimensions. This means it contains either 2 or 3 64-bit floating point values, which together are called the _Coordinate_. -* Each point will also be associated with a specific xref::values-and-types/spatial.adoc#cypher-spatial-crs[Coordinate Reference System] (CRS) that determines the meaning of the values in the _Coordinate_. +* Each point will also be associated with a specific xref::values-and-types/spatial.adoc#spatial-values-crs[Coordinate Reference System] (CRS) that determines the meaning of the values in the _Coordinate_. * Instances of `Point` and lists of `Point` can be assigned to node and relationship properties. * Nodes and relationships with `Point` or `List(Point)` properties can be indexed using a xref::indexes-for-search-performance.adoc#indexes-create-a-node-point-index [point index].