|
| 1 | +:description: This is the Cypher Query Language documentation for Neo4j, authored by the Neo4j Team. |
| 2 | + |
| 3 | +[[cypher-manual]] |
| 4 | += The Neo4j Cypher Manual v{neo4j-version} |
| 5 | +:neo4j-buildnumber: {neo4j-version-minor} |
| 6 | + |
| 7 | +Cypher is Neo4j's graph query language that allows users to store and retrieve data from the graph database. |
| 8 | +It is a declarative, SQL-inspired language for describing visual patterns in graphs. |
| 9 | +The syntax provides a visual and logical way to match patterns of nodes and relationships in the graph. |
| 10 | + |
| 11 | + |
| 12 | +== Documentation updates for Neo4j 5 |
| 13 | + |
| 14 | +Neo4j {neo4j-version} includes a number of new features and updates. |
| 15 | +A highlight of these include: |
| 16 | + |
| 17 | +* Cypher syntax improvements with Graph Pattern Matching (relationships and labels): |
| 18 | ++ |
| 19 | +** In `MATCH` clauses, `WHERE` can be placed inside a relationship pattern to filter relationships. |
| 20 | +** In `MATCH` clauses, nodes and relationships can be filtered using more sophisticated label (type) expressions. |
| 21 | +** Simpler alternative syntax to navigate and traverse graphs using the following operators: |
| 22 | +*** `&`: logical `AND` |
| 23 | +*** `|`: logical `OR` |
| 24 | +*** `!`: logical `NOT` |
| 25 | +*** `%`: a "wildcard", meaning "any label" (in Cypher this translates to `size(labels(n)) > 0`). + |
| 26 | + |
| 27 | ++ |
| 28 | +For more information, see the xref:syntax/expressions.adoc#label-expressions[section on Label expressions] and in xref:clauses/where.adoc[the `WHERE` clause]. |
| 29 | + |
| 30 | +* New `elementID` for graph objects: |
| 31 | ++ |
| 32 | +New IDs are introduced to uniquely identify graph elements in Neo4j databases. |
| 33 | +Node ID will exist with each release of Neo4j {neo4j-version}. |
| 34 | ++ |
| 35 | +For more information, see xref:functions/scalar.adoc#functions-elementid[`elementId()`]. |
| 36 | + |
| 37 | +* Composite databases. |
| 38 | ++ |
| 39 | +Composite databases allow queries that access multiple graphs at once. |
| 40 | +You can create, update, and remove configurations without a restart, whether the database is within the same cluster, or hosted remotely. |
| 41 | ++ |
| 42 | +For more information on composite databases, and how to create composite databases, see link:https://neo4j.com/docs/operations-manual/current/composite-databases/[Operations Manual -> Composite databases], and xref:databases.adoc#administration-databases-create-composite-database[Creating composite databases]. |
| 43 | + |
| 44 | +* Immutable privileges. |
| 45 | ++ |
| 46 | +Immutable privileges are useful for restricting the actions of users who themselves are able to administer privileges. + |
| 47 | +For more information, see xref:access-control/privileges-immutable.adoc[Immutable privileges]. |
| 48 | + |
| 49 | +* `Execute` and `ExecuteBoosted` privilege. |
| 50 | ++ |
| 51 | +The permissions for the execution of admin procedures have been refreshed; these two privileges are now hierarchically related. |
| 52 | ++ |
| 53 | +For more information, see xref:access-control/dbms-administration.adoc#access-control-execute-procedure[the `EXECUTE PROCEDURE` privilege] and xref:access-control/dbms-administration.adoc#access-control-execute-boosted-procedure[the `EXECUTE BOOSTED PROCEDURE` privilege]. |
| 54 | + |
| 55 | +* `EXISTS` and `COUNT` are now both expressions. |
| 56 | ++ |
| 57 | +For more information, see xref:syntax/expressions.adoc#cypher-subquery-expressions[Subquery expressions]. |
| 58 | + |
| 59 | +* `SHOW` and `TERMINATE TRANSACTIONS` improvements. |
| 60 | ++ |
| 61 | +You can now combine these two commands in the same query. |
| 62 | +The ability to yield and filter the output from `TERMINATE TRANSACTIONS` has been added. |
| 63 | ++ |
| 64 | +For more information, see xref:deprecations-additions-removals-compatibility.adoc#_updated_features[Updated features list]. |
| 65 | + |
| 66 | +* `SHOW SETTINGS` clause. |
| 67 | ++ |
| 68 | +You can now query configuration settings using `SHOW SETTINGS` clause. |
| 69 | ++ |
| 70 | +For more information, see xref:clauses/listing-settings.adoc[SHOW SETTINGS]. |
| 71 | + |
| 72 | +* Changes to Neo4j indexes: |
| 73 | ++ |
| 74 | +** The B-tree index type has been removed. |
| 75 | +** New Range and Point index types are available now. |
| 76 | +** Faster Text index provider for `ENDS WITH` and `CONTAINS` queries is introduced. |
| 77 | +** Full-text indexes can now index lists of strings. |
| 78 | + |
| 79 | ++ |
| 80 | +For more information, see xref:indexes-for-search-performance.adoc[new index types]. |
| 81 | + |
| 82 | + |
| 83 | +ifdef::backend-html5[(C) {copyright}] |
| 84 | +ifndef::backend-pdf[] |
| 85 | + |
| 86 | +Documentation license: link:{common-license-page-uri}[Creative Commons 4.0] |
| 87 | +endif::[] |
| 88 | +ifdef::backend-pdf[] |
| 89 | +(C) {copyright} |
| 90 | + |
| 91 | +Documentation license: <<license, Creative Commons 4.0>> |
| 92 | +endif::[] |
| 93 | + |
| 94 | +ifdef::backend-pdf[] |
| 95 | +include::license.adoc[leveloffset=+1] |
| 96 | +endif::[] |
| 97 | + |
| 98 | + |
0 commit comments