List of all notification codes

The following are all Neo4j notifications, grouped by category, when they are returned, and an example of improvement.

PERFORMANCE category

Performance notifications are returned whenever the query uses costly operations and the performance may be improved by changing the query or adding an index.

CartesianProduct

When is this notification returned?

Whenever there is a cartesian product in the plan.

Table 1. Notification details

Code

Neo.ClientNotification.Statement.CartesianProduct

Title

This query builds a cartesian product between disconnected patterns.

Severity

INFORMATION

Category

PERFORMANCE

Example 1. Cartesian product
Query
MATCH (c:Child), (p:Parent) RETURN c, p
Description of the returned code

If a part of a query contains multiple disconnected patterns, this will build a cartesian product between all those parts. This may produce a large amount of data and slow down query processing. While occasionally intended, it may often be possible to reformulate the query that avoids the use of this cross product, perhaps by adding a relationship between the different parts or by using OPTIONAL MATCH (identifier is: (p))

Suggestions for improvement

In case a cartesian product is needed, nothing can be done to improve this query. In many cases, however, you might not need a combination of all children and parents, and that is when this query could be improved. If for example, you need the children and the children’s parents, you can improve this query by rewriting it to the following:

MATCH (c:Child)-[:ChildOf]->(p:Parent) RETURN c, p

UnboundedVariableLengthPattern

When is this notification returned?

When there is no upper bound specified on the variable length relationship.

Table 2. Notification details

Code

Neo.ClientNotification.Statement.UnboundedVariableLengthPattern

Title

The provided pattern is unbounded, consider adding an upper limit to the number of node hops.

Severity

INFORMATION

Category

PERFORMANCE

Example 2. Shortest path with an unbounded pattern
Query
MATCH p=shortestPath((n)-[*]->(m)) RETURN p
Description of the returned code

Using shortest path with an unbounded pattern will likely result in long execution times. It is recommended to use an upper limit to the number of node hops in your pattern.

Suggestions for improvement

If you have a big graph, this query might be very slow. Consider adding an upper limit.

MATCH p=shortestPath((n)-[*..8]->(m)) RETURN p

ExhaustiveShortestPath

When is this notification returned?

When a predicate, given on the shortest path, needs to inspect the whole path before deciding whether it is valid, the shortest path might fall back to the exhaustive search algorithm. For more information, see Cypher manual → Shortest path - additional predicate checks on the paths.

Table 3. Notification details

Code

Neo.ClientNotification.Statement.ExhaustiveShortestPath

Title

Exhaustive shortest path has been planned for your query that means that shortest path graph algorithm might not be used to find the shortest path. Hence an exhaustive enumeration of all paths might be used in order to find the requested shortest path.

Severity

INFORMATION

Category

PERFORMANCE

Example 3. Exhaustive shortest path
MATCH p = shortestPath(()-[*..42]-())
WHERE ANY(n in nodes(p) WHERE n:Label)
RETURN p
Description of the returned code

Using shortest path with an exhaustive search fallback might cause query slow down since shortest path graph algorithms might not work for this use case. It is recommended to introduce a WITH to separate the MATCH containing the shortest path from the existential predicates on that path.

Suggestions for improvement

Separate the predicate by introducing a WITH after the MATCH clause.

MATCH p = shortestPath(()-[*..42]-())
WITH p
WHERE ANY(n in nodes(p) WHERE n:Label)
RETURN p

NoApplicableIndex

When is this notification returned?

Given a larger number of nodes, LOAD CSV together with a MATCH or a MERGE clause may speed up the query if you add an index.

Table 4. Notification details

Code

Neo.ClientNotification.Statement.NoApplicableIndex

Title

Adding a schema index may speed up this query.

Severity

INFORMATION

Category

PERFORMANCE

Example 4. Load CSV with MATCH or MERGE
Query
LOAD CSV FROM 'file:///ignore/ignore.csv' AS line WITH * MATCH (n:Person{name:line[0]}) RETURN line, n
Description of the returned code

Using LOAD CSV followed by a MATCH or MERGE that matches a non-indexed label will most likely not perform well on large data sets. Please consider using a schema index.

Suggestions for improvement

Create an index on the label and property you match.

CREATE INDEX FOR (n:Person) ON (n.name)

EagerOperator

When is this notification returned?

When the execution plan for a query contains an eager operator.

Table 5. Notification details

Code

Neo.ClientNotification.Statement.EagerOperator

Title

The execution plan for this query contains the Eager operator, which forces all dependent data to be materialized in main memory before proceeding

Severity

INFORMATION

Category

PERFORMANCE

Example 5. Load CSV with MATCH or MERGE

LOAD CSV together with an Eager operator can take up a lot of memory.

Query
LOAD CSV FROM 'file:///ignore/ignore.csv' AS line MATCH (n:Person{name:line[0]}) DELETE n RETURN line
Description of the returned code

Using LOAD CSV with a large data set in a query where the execution plan contains the Eager operator could potentially consume a lot of memory and is likely to not perform well. See the Neo4j Manual entry on the Eager operator for more information and hints on how problems could be avoided.

Suggestions for improvement

See the Cypher Manual → Eager operator for more information and hints on how to avoid problems. In this specific case, the query could be rewritten to the following:

LOAD CSV FROM 'file:///ignore/ignore.csv' AS line
CALL {
    WITH line
    MATCH (n:Person{name:line[0]}) DELETE n
}
RETURN line

DynamicProperty

Table 6. Notification details

Code

Neo.ClientNotification.Statement.DynamicProperty

Title

Queries using dynamic properties will use neither index seeks nor index scans for those properties

Severity

INFORMATION

Category

PERFORMANCE

Example 6. Using a dynamic node property key makes it impossible to use indexes
Query
MATCH (n:Person) WHERE n[$prop] IS NOT NULL RETURN n;
Description of the returned code

Did not supply query with enough parameters. The produced query plan will not be cached and is not executable without EXPLAIN. (Missing parameters: prop)

Suggestions for improvement

If there is an index for (n:Person) ON (n.name), it will not be used for the above query because the query is using a dynamic property. Therefore, if there is an index, it is better to use the constant value. For example, if prop is equal to name, the following query would be able to use the index:

MATCH (n:Person) WHERE n.name IS NOT NULL RETURN n;
Example 7. Using dynamic relationship property key makes it impossible to use indexes
Query
MATCH ()-[r: KNOWS]->() WHERE r[$prop] IS NOT NULL RETURN r
Description of the returned code

Did not supply query with enough parameters. The produced query plan will not be cached and is not executable without EXPLAIN. (Missing parameters: prop)

Suggestions for improvement

Similar to dynamic node properties, use a constant value if possible, especially when there is an index on the relationship property. For example, if $prop is equal to since, you can rewrite the query to:

MATCH ()-[r: KNOWS]->() WHERE r.since IS NOT NULL RETURN r

CodeGenerationFailed

Table 7. Notification details

Code

Neo.ClientNotification.Statement.CodeGenerationFailed

Title

The database was unable to generate code for the query. A stack trace can be found in the debug.log.

Severity

INFORMATION

Category

PERFORMANCE

The CodeGenerationFailed notification is created when it is not possible to generate a code for a query, for example, when the query is too big. To find more information about the specific query, see the stack trace in the debug.log file.

HINT category

HINT notifications are returned by default when the Cypher planner or runtime cannot create a query plan to fulfill a specified hint, for example, JOIN or INDEX. This behavior of the Cypher planner or runtime can be changed by setting the configuration dbms.cypher.hints_error to true, in which case, the query will return an error instead.

JoinHintUnfulfillableWarning

Table 8. Notification details

Code

Neo.ClientNotification.Statement.JoinHintUnfulfillableWarning

Title

The database was unable to plan a hinted join.

Severity

WARNING

Category

HINT

Example 8. A JOIN hint was given, but it was not possible to fulfill the hint.
Query
MATCH (a:A)
WITH a, 1 AS horizon
OPTIONAL MATCH (a)-[r]->(b:B)
USING JOIN ON a
OPTIONAL MATCH (a)--(c)
RETURN *
Description of the returned code

The hinted join was not planned. This could happen because no generated plan contained the join key, please try using a different join key or restructure your query. (hinted join key identifier is: a)

Suggestions for improvement

The join hint cannot be fulfilled because the given JOIN variable was introduced before the optional match and is therefore already bound. The only option for this query is to remove the hint or change the query so it is possible to use the hint.

HintedIndexNotFound

Table 9. Notification details

Code

Neo.ClientNotification.Schema.HintedIndexNotFound

Title

The request (directly or indirectly) referred to an index that does not exist.

Severity

WARNING

Category

HINT

Example 9. An index hint was given, but it was not possible to use the index.
Query
MATCH (a: Label)
USING INDEX a:Label(id)
WHERE a.id = 1
RETURN a
Description of the returned code

The hinted index does not exist, please check the schema (index is: INDEX FOR (a:`Label`) ON (a.id))

Suggestions for improvement

The hinted index does not exist, make sure the label and property are spelled correctly. If the spelling is correct, either create the index or remove the hint from the query.

Example 10. A relationship index hint was given, but it was not possible to use the index
Query
MATCH ()-[r:Rel]-()
USING INDEX r:Rel(id)
WHERE r.id = 1
RETURN r
Description of the returned code

The hinted index does not exist, please check the schema (index is: INDEX FOR ()-[r:`Rel`]-() ON (r.id))

Suggestions for improvement

The hinted index does not exist, make sure the label and property are spelled correctly. If the spelling is correct, either create the index or remove the hint from the query.

UNRECOGNIZED category

A notification has the unrecognized category if the query or command mentions entities that are unknown to the system.

HomeDatabaseNotFound

Table 10. Notification details

Code

Neo.ClientNotification.Database.HomeDatabaseNotFound

Title

The request referred to a home database that does not exist.

Severity

INFORMATION

Category

UNRECOGNIZED

Example 11. Set the home database to a database that does not yet exist.
Query
CREATE USER linnea SET PASSWORD "password" SET HOME DATABASE NonExistingDatabase
Description of the returned code

The home database provided does not currently exist in the DBMS. This command will not take effect until this database is created. (HOME DATABASE: nonexistingdatabase)

Suggestions for improvement

Make sure the home database has not been misspelled.

UnknownLabelWarning

Table 11. Notification details

Code

Neo.ClientNotification.Statement.UnknownLabelWarning

Title

The provided label is not in the database.

Severity

WARNING

Category

UNRECOGNIZED

Example 12. Match on a node with a label that does not exist in the database.
Query
MATCH (n:Perso) RETURN n
Description of the returned code

One of the labels in your query is not available in the database, make sure you didn’t misspell it or that the label is available when you run this statement in your application (the missing label name is: Perso)

Suggestions for improvement

Make sure you didn’t misspell the label. If nodes with the given label will be created in the future, then no change is needed.

UnknownRelationshipTypeWarning

Table 12. Notification details

Code

Neo.ClientNotification.Statement.UnknownRelationshipTypeWarning

Title

The provided relationship type is not in the database.

Severity

WARNING

Category

UNRECOGNIZED

Example 13. Match on a relationship, where there are no relationships in the database with the given relationship type.
Query
MATCH (n)-[:NonExistingType]->() RETURN n
Description of the returned code

One of the relationship types in your query is not available in the database, make sure you didn’t misspell it or that the label is available when you run this statement in your application (the missing relationship type is: NonExistingType)

Suggestions for improvement

Make sure you did not misspell the relationship type. If relationships will be created, with the given relationship type, in the future, then no change to the query is needed.

UnknownPropertyKeyWarning

Table 13. Notification details

Code

Neo.ClientNotification.Statement.UnknownPropertyKeyWarning

Title

The provided property key is not in the database

Severity

WARNING

Category

UNRECOGNIZED

Example 14. Match on a property key that does not exist.
Query
MATCH (n {nonExistingProp:1}) RETURN n
Description of the returned code

One of the property names in your query is not available in the database, make sure you didn’t misspell it or that the label is available when you run this statement in your application (the missing property name is: nonExistingProp)

Suggestions for improvement

Make sure you didn’t misspell the property key. If the property key will be created in the future, then no change is needed to the query.

UNSUPPORTED category

Notifications with the unsupported category are created if the query or command is trying to use features that are not supported by the current system or using experimental features that should not be used in production.

RuntimeUnsupportedWarning

Table 14. Notification details

Code

Neo.ClientNotification.Statement.RuntimeUnsupportedWarning

Title

This query is not supported by the chosen runtime.

Severity

WARNING

Category

UNSUPPORTED

Example 15. The chosen runtime is not supported for the given query
Query
CYPHER runtime=pipelined SHOW INDEXES YIELD *
Description of the returned code

Selected runtime is unsupported for this query, please use a different runtime instead or fallback to default. (Pipelined does not yet support the plans including ShowIndexes, use another runtime.)

Suggestions for improvement

Use a different runtime or remove the runtime option to run the query with the default runtime:

SHOW INDEXES YIELD *

RuntimeExperimental

Table 15. Notification details

Code

Neo.ClientNotification.Statement.RuntimeExperimental

Title

This feature is experimental and should not be used in production systems.

Severity

WARNING

Category

UNSUPPORTED

Example 16. Use of the parallel runtime
Query
CYPHER runtime=parallel MATCH (n) RETURN (n)
Description of the returned code

You are using an experimental feature (The parallel runtime is experimental and might suffer from instability and potentially correctness issues.)

Suggestions for improvement

The parallel runtime should not be used in production. Choose another runtime or remove the option to use the default runtime:

MATCH (n) RETURN (n)

DEPRECATION category

Notifications within the deprecation category contain information about a feature or functionality which has been deprecated. It is important to change to the new functionality, otherwise, the query might break in a future version.

FeatureDeprecationWarning

Table 16. Notification details

Code

Neo.ClientNotification.Statement.FeatureDeprecationWarning

Title

This feature is deprecated and will be removed in future versions.

Severity

WARNING

Category

DEPRECATION

Example 17. Colon after the | in a relationship pattern
Query
MATCH (a)-[:A|:B|:C]-() RETURN *
Description of the returned code

The semantics of using colon in the separation of alternative relationship types will change in a future version. (Please use ':A|B|C' instead)

Suggestions for improvement

Remove the colon inside the relationship type expression.

MATCH (a)-[:A|B|C]-() RETURN *
Example 18. Setting properties using a node
Query
MATCH (a)-[]-(b)
SET a = b
Description of the returned code

The use of nodes or relationships for setting properties is deprecated and will be removed in a future version. Please use properties() instead.

Suggestions for improvement

Use the properties() function to get all properties from b.

MATCH (a)-[]-(b)
SET a = properties(b)
Example 19. Setting properties using a relationship
Query
MATCH (a)-[r]-(b)
SET a += r
Description of the returned code

The use of nodes or relationships for setting properties is deprecated and will be removed in a future version. Please use properties() instead.

Suggestions for improvement

Use the properties() function to get all properties from r

MATCH (a)-[r]-(b)
SET a += properties(r)
Example 20. Shortest path with a fixed relationship length
Query
MATCH (a:Start), shortestPath((a)-[r]->()) RETURN a
Description of the returned code

The use of shortestPath and allShortestPaths with fixed length relationships is deprecated and will be removed in a future version. Please use a path with a length of 1 [r*1..1] instead or a Match with a limit.

Suggestions for improvement

If the relationship length is fixed, there is no reason to search for the shortest path. Instead, you can rewrite it to the following:

MATCH (a: Start)-[r]->(b: End) RETURN b LIMIT 1
Example 21. Create a database with an unescaped name containing a dot
Query
CREATE DATABASE foo.bar
Description of the returned code

Databases and aliases with unescaped . are deprecated unless to indicate that they belong to a composite database. Names containing . should be escaped. (Name: foo.bar)

Suggestions for improvement

If not intended for a composite database, escape the name with the character `.

CREATE DATABASE `foo.bar`
Example 22. A procedure has been deprecated or renamed
CALL unsupported.dbms.shutdown
Description of the returned code

The query used a deprecated procedure: 'unsupported.dbms.shutdown'.

Suggestions for improvement

Remove the use of the deprecated procedure. If there is a suggested replacement, update to use the replacement instead.

Example 23. Using a deprecated runtime option
Query
CYPHER runtime = interpreted MATCH (n) RETURN n
Description of the returned code

The query used a deprecated runtime option. ('runtime=interpreted' is deprecated, please use 'runtime=slotted' instead)

Suggestions for improvement

Runtime interpreted is deprecated, use another runtime or remove the runtime option to use the default runtime.

MATCH (n) RETURN n
Example 24. Using the text-1.0 index provider when creating a text index
Query
CREATE TEXT INDEX FOR (n:Label) ON (n.prop) OPTIONS {indexProvider : 'text-1.0'}
Description of the returned code

The text-1.0 provider for text indexes is deprecated and will be removed in a future version. Please use text-2.0 instead.

Suggestions for improvement

Update the option indexProvider with the value text-2.0.

CREATE TEXT INDEX FOR (n:Label) ON (n.prop) OPTIONS {indexProvider : 'text-2.0'}
Example 25. Using differently ordered return items in a UNION clause
Query
RETURN 'val' as one, 'val' as two
UNION
RETURN 'val' as two, 'val' as one
Description of the returned code

All subqueries in a UNION [ALL] should have the same ordering for the return columns. Using differently ordered return items in a UNION [ALL] clause is deprecated and will be removed in a future version.

Suggestions for improvement

Use the same order for the return columns in all subqueries combined by a UNION clause.

RETURN 'val' as one, 'val' as two
UNION
RETURN 'val' as one, 'val' as two
Example 26. Using id() function
Query
MATCH (a)
RETURN id(a)
Description of the returned code

The query used a deprecated function: id.

Suggestions for improvement

Use the function elementId() instead.

MATCH (a)
RETURN elementId(a)
Example 27. Using Cypher query option connectComponentsPlanner
Query
CYPHER connectComponentsPlanner=greedy MATCH (a), (b) RETURN *
Description of the returned code

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. For more information, see Cypher manual → Cypher planner.

Example 28. Using the unicode \u0085 in an unescaped identifier
Query
RETURN 1 as my\u0085identifier
Description of the returned code

The Unicode character `\u0085` is deprecated for unescaped identifiers and will be considered as a whitespace character in the future. To continue using it, escape the identifier by adding backticks around the identifier `my…identifier`.

DeprecatedFormat

Table 17. Notification details

Code

Neo.ClientNotification.Request.DeprecatedFormat

Title

The client requested a deprecated format.

Severity

WARNING

Category

DEPRECATION

SECURITY category

Security notifications indicate that the result of the query or command might have a potential security issue. Verify that this is the intended behavior of your query or command.

CommandHasNoEffect

Table 18. Notification details

Code

Neo.ClientNotification.Security.CommandHasNoEffect

Title

<command> has no effect.*

Severity

INFORMATION

Category

SECURITY

*`<command>` could be either the full command given by the user or a subset of the given command.

Example 29. Granting a role to a user who already has that role
Command
GRANT ROLE admin TO john
Full title of the returned code

GRANT ROLE admin TO john has no effect.

Description of the returned code

The user already has the role. See Status Codes documentation for more information.

Suggestions for improvement

Verify that this is the intended role and user.

Example 30. Revoking a role from a user who does not have that role
Command
REVOKE ROLE admin, reader FROM jane
Full title of the returned code

REVOKE ROLE reader FROM jane has no effect.

Description of the returned code

The user does not have the role. See Status Codes documentation for more information.

Suggestions for improvement

Verify that this is the intended role and user.

Example 31. Granting or denying a privilege to a role that already has that privilege
Command
GRANT TRAVERSE ON GRAPH * TO reader
Full title of the returned code

GRANT TRAVERSE ON GRAPH * NODE * TO reader has no effect.

Description of the returned code

The role already has the privilege. See Status Codes documentation for more information.

Suggestions for improvement

Verify that this is the intended privilege and role.

Example 32. Revoking a privilege from a role that does not have that privilege
Command
REVOKE WRITE ON GRAPH * FROM reader
Full title of the returned code

REVOKE DENY WRITE ON GRAPH * FROM reader has no effect.

Description of the returned code

The role does not have the privilege. See Status Codes documentation for more information.

Suggestions for improvement

Verify that this is the intended privilege and role.

ImpossibleRevokeCommand

Table 19. Notification details

Code

Neo.ClientNotification.Security.ImpossibleRevokeCommand

Title

<command> has no effect.*

Severity

WARNING

Category

SECURITY

*`<command>` could be either the full command given by the user or a subset of the given command.

Example 33. Revoking a non-existing role from a user
Command
REVOKE ROLE manager, reader FROM jane
Full title of the returned code

REVOKE ROLE manager FROM jane has no effect.

Description of the returned code

Role does not exist. Make sure nothing is misspelled. This notification will become an error in a future major version. See Status Codes documentation for more information.

Suggestions for improvement

Verify that this is the intended role and that it is spelled correctly.

Example 34. Revoking a role from a non-existing user
Command
REVOKE ROLE reader FROM alice
Full title of the returned code

REVOKE ROLE reader FROM alice has no effect.

Description of the returned code

User does not exist. Make sure nothing is misspelled. This notification will become an error in a future major version. See Status Codes documentation for more information.

Suggestions for improvement

Verify that this is the intended user and that it is spelled correctly.

Example 35. Revoking a privilege from a non-existing role
Command
REVOKE GRANT WRITE ON GRAPH * FROM manager
Full title of the returned code

REVOKE GRANT WRITE ON GRAPH * FROM manager has no effect.

Description of the returned code

Role does not exist. Make sure nothing is misspelled. This notification will become an error in a future major version. See Status Codes documentation for more information.

Suggestions for improvement

Verify that this is the intended role and that it is spelled correctly.

Example 36. Revoking a privilege on a non-existing graph from a role
Command
REVOKE GRANT WRITE ON GRAPH neo3j FROM editor
Full title of the returned code

REVOKE GRANT WRITE ON GRAPH neo3j FROM editor has no effect.

Description of the returned code

Database 'neo3j' does not exist. Make sure nothing is misspelled. This notification will become an error in a future major version. See Status Codes documentation for more information.

Suggestions for improvement

Verify that this is the intended graph and that it is spelled correctly.

Example 37. Revoking a privilege on a non-existing database from a role
Command
REVOKE GRANT ACCESS ON DATABASE neo3j FROM editor
Full title of the returned code

REVOKE GRANT ACCESS ON DATABASE neo3j FROM editor has no effect.

Description of the returned code

Database 'neo3j' does not exist. Make sure nothing is misspelled. This notification will become an error in a future major version. See Status Codes documentation for more information.

Suggestions for improvement

Verify that this is the intended database and that it is spelled correctly.

Example 38. Revoking a privilege from a role with wildcard graph parameter
Parameter
{
    "graph": "*"
}
Command
REVOKE GRANT CREATE ON GRAPH $graph FROM PUBLIC
Full title of the returned code

REVOKE GRANT CREATE ON GRAPH $graph FROM PUBLIC has no effect.

Description of the returned code

Parameterized database and graph names do not support wildcards. Make sure nothing is misspelled. This notification will become an error in a future major version. See Status Codes documentation for more information.

Suggestions for improvement

Use GRAPH * without the parameter to revoke the privilege on all graphs.

Example 39. Revoking a privilege from a role with wildcard database parameter
Parameter
{
    "database": "*"
}
Command
REVOKE GRANT ACCESS ON DATABASE $database FROM PUBLIC
Full title of the returned code

REVOKE GRANT ACCESS ON DATABASE $database FROM PUBLIC has no effect.

Description of the returned code

Parameterized database and graph names do not support wildcards. Make sure nothing is misspelled. This notification will become an error in a future major version. See Status Codes documentation for more information.

Suggestions for improvement

Use DATABASE * without the parameter to revoke the privilege on all databases.

TOPOLOGY category

Topology notifications provide additional information related to managing databases and servers.

CordonedServersExistedDuringAllocation

When is this notification returned?

When a Cypher administration command triggers an allocation decision and some of the servers are cordoned. For example, CREATE DATABASE, ALTER DATABASE, DEALLOCATE DATABASES FROM SERVER[S], and ALTER DATABASE return this notification. However, REALLOCATE DATABASES requires that there are no cordoned servers and, therefore, does not return it.

Table 20. Notification details

Code

Neo.ClientNotification.Cluster.CordonedServersExistedDuringAllocation

Title

Cordoned servers existed when making an allocation decision.

Severity

INFORMATION

Category

TOPOLOGY

Example 40. Cordoned servers existed during an allocation decision

The example assumes that you have a cluster with three servers, of which server 123e4567-e89b-12d3-a456-426614174000 is cordoned using the dbms.cluster.cordonServer procedure. Then the below command will return this notification.

Command
CREATE DATABASE foo TOPOLOGY 2 PRIMARIES
Description of the returned code

Server(s) 123e4567-e89b-12d3-a456-426614174000 are cordoned. This can impact allocation decisions.

NoDatabasesReallocated

Table 21. Notification details

Code

Neo.ClientNotification.Cluster.NoDatabasesReallocated

Title

<command> has no effect.

Severity

INFORMATION

Category

TOPOLOGY

Example 41. Reallocating databases resulted in no allocation changes
Command
REALLOCATE DATABASES
Description of the returned code

No databases were reallocated. No better allocation is currently possible.

Example scenarios

Scenario 1: The cluster is already balanced. For example, when there are three servers, each hosting databases foo and bar, meaning all databases are allocated to all servers.

Scenario 2: The cluster appears unbalanced, but server constraints prevent you from moving to a better, more balanced, allocation. For example, assuming server 1 hosts databases foo and bar, server 2 hosts only foo, and server 3 hosts no databases. Then, a better allocation would move foo from server 1 to server 3, but if server 3 has the constraint deniedDatabases:['foo']}, then the cluster is already balanced subject to this constraint.

RequestedTopologyMatchedCurrentTopology

Table 22. Notification details

Code

Neo.ClientNotification.Cluster.RequestedTopologyMatchedCurrentTopology

Title

<command> has no effect.

Severity

INFORMATION

Category

TOPOLOGY

Example 42. Requested topology matched current topology

The example assumes that you have a cluster with three servers and a database foo with a topology of two primaries and one secondary.

Command
ALTER DATABASE foo SET TOPOLOGY 2 PRIMARIES 1 SECONDARY
Description of the returned code

The requested topology matched the current topology. No allocations were changed.

ServerAlreadyEnabled

Table 23. Notification details

Code

Neo.ClientNotification.Cluster.ServerAlreadyEnabled

Title

<command> has no effect.

Severity

INFORMATION

Category

TOPOLOGY

Example 43. Enabling an already enabled server
Command
ENABLE SERVER "123e4567-e89b-12d3-a456-426614174000"
Description of the returned code

Server 123e4567-e89b-12d3-a456-426614174000 is already enabled. Verify that this is the intended server.

SCHEMA category

Schema notifications provide additional information related to indexes and constraints.

IndexOrConstraintAlreadyExists

Table 24. Notification details

Code

Neo.ClientNotification.Schema.IndexOrConstraintAlreadyExists

Title

<command> has no effect.

Description

<conflicting> already exists.

Severity

INFORMATION

Category

SCHEMA

Example 44. Creating an index when an equivalent index already exists

Given a range index on (:Label {property}) named existingRangeIndex.

Command
CREATE INDEX labelProperyRangeIndex IF NOT EXISTS FOR (n:Label) ON (n.property)
Full title of the returned code

CREATE RANGE INDEX labelProperyRangeIndex IF NOT EXISTS FOR (e:Label) ON (e.property) has no effect.

Full description of the returned code

RANGE INDEX existingRangeIndex FOR (e:Label) ON (e.property) already exists.

Example 45. Creating an index when another unrelated index using that name already exists

Given a range index on (:Label {property}) named myIndex.

Command
CREATE TEXT INDEX myIndex IF NOT EXISTS FOR ()-[r:REL_TYPE]-() ON (r.property)
Full title of the returned code

CREATE TEXT INDEX myIndex IF NOT EXISTS FOR ()-[e:REL_TYPE]-() ON (e.property) has no effect.

Full description of the returned code

RANGE INDEX myIndex FOR (e:Label) ON (e.property) already exists.

Suggestions for improvement

Choose a different name for the new index and try again.

CREATE TEXT INDEX myIndex2 IF NOT EXISTS FOR ()-[r:REL_TYPE]-() ON (r.property)
Example 46. Creating a constraint when an identical constraint already exists

Given a node key constraint on (:Label {property}) named nodeKeyLabelPropertyConstraint.

Command
CREATE CONSTRAINT nodeKeyLabelPropertyConstraint IF NOT EXISTS FOR (n:Label) REQUIRE (n.property) IS NODE KEY
Full title of the returned code

CREATE CONSTRAINT nodeKeyLabelPropertyConstraint IF NOT EXISTS FOR (e:Label) REQUIRE (e.property) IS NODE KEY has no effect.

Full description of the returned code

CONSTRAINT nodeKeyLabelPropertyConstraint FOR (e:Label) REQUIRE (e.property) IS NODE KEY already exists.

Example 47. Creating a constraint when another unrelated constraint using that name already exists

Given a node key constraint on (:Label {property}) named myConstraint.

Command
CREATE CONSTRAINT myConstraint IF NOT EXISTS FOR (n:Label2) REQUIRE (n.property2) IS NOT NULL
Full title of the returned code

CREATE CONSTRAINT myConstraint IF NOT EXISTS FOR (e:Label2) REQUIRE (e.property2) IS NOT NULL has no effect.

Full description of the returned code

CONSTRAINT myConstraint FOR (e:Label) REQUIRE (e.property) IS NODE KEY already exists.

Suggestions for improvement

Choose a different name for the new constraint and try again.

CREATE CONSTRAINT myConstraint2 IF NOT EXISTS FOR (n:Label2) REQUIRE (n.property2) IS NOT NULL

IndexOrConstraintDoesNotExist

Table 25. Notification details

Code

Neo.ClientNotification.Schema.IndexOrConstraintDoesNotExist

Title

<command> has no effect.

Description

<name> does not exist.

Severity

INFORMATION

Category

SCHEMA

Example 48. Attempting to drop a non-existing index
Command
DROP INDEX nonExistingIndex IF EXISTS
Full title of the returned code

DROP INDEX nonExistingIndex IF EXISTS has no effect.

Full description of the returned code

nonExistingIndex does not exist.

Suggestions for improvement

Verify that this is the intended index and that it is spelled correctly.

Example 49. Attempting to drop a non-existing constraint
Command
DROP CONSTRAINT nonExistingConstraint IF EXISTS
Full title of the returned code

DROP CONSTRAINT nonExistingConstraint IF EXISTS has no effect.

Full description of the returned code

nonExistingConstraint does not exist.

Suggestions for improvement

Verify that this is the intended constraint and that it is spelled correctly.

GENERIC category

GENERIC notification codes do not belong to any wider category and do not have any connection to each other.

SubqueryVariableShadowing

Table 26. Notification details

Code

Neo.ClientNotification.Statement.SubqueryVariableShadowing

Title

Variable in subquery is shadowing a variable with the same name from the outer scope.

Severity

INFORMATION

Category

GENERIC

Example 50. Shadowing of a variable from the outer scope
Query
MATCH (n)
CALL {
  MATCH (n)--(m)
  RETURN m
}
RETURN *
Description of the returned code

Variable in subquery is shadowing a variable with the same name from the outer scope. If you want to use that variable instead, it must be imported into the subquery using importing WITH clause. (the shadowing variable is: n)

Suggestions for improvement

If the intended behavior of the query is for the variable in the subquery to be a new variable, then nothing needs to be done. If the intended behavior is to use the variable from the outer query, it needs to be imported to the subquery using the with clause.

MATCH (n)
CALL {
  WITH n
  MATCH (n)--(m)
  RETURN m
}
RETURN *

ParameterNotProvided

Table 27. Notification details

Code

Neo.ClientNotification.Statement.ParameterNotProvided

Title

The statement refers to a parameter that was not provided in the request.

Severity

WARNING

Category

GENERIC

Example 51. Using an EXPLAIN query with parameters without providing them
Query
EXPLAIN WITH $param as param RETURN param
Description of the returned code

Did not supply query with enough parameters. The produced query plan will not be cached and is not executable without EXPLAIN. (Missing parameters: param)

Suggestions for improvement

Provide the parameter to be able to cache the plan.

ProcedureWarning

Table 28. Notification details

Code

Neo.ClientNotification.Procedure.ProcedureWarning

Title

The query used a procedure that generated a warning.

Severity

WARNING

Category

GENERIC

UnsatisfiableRelationshipTypeExpression

Introduced in Neo4j 5.4

When is this notification returned?

When matching on a relationship type expression that can never be satisfied, for example asking for zero, more than one or contradictory types.

Table 29. Notification category details

Code

Neo.ClientNotification.Statement.UnsatisfiableRelationshipTypeExpression

Title

The query contains a relationship type expression that cannot be satisfied.

Severity

WARNING

Category

GENERIC

Example 52. Matching on a relationship type expression that can never be satisfied
Query
MATCH ()-[r:R1&R2]->() RETURN r
Description of the returned code

Relationship type expression cannot possibly be satisfied. (R1&R2 can never be fulfilled by any relationship. Relationships must have exactly one type.)

Neo.ClientNotification.Statement.RepeatedRelationshipReference

Table 30. Notification category details

Code

Neo.ClientNotification.Statement.RepeatedRelationshipReference

Title

The query returns no results because a relationship variable is bound more than once.

Severity

WARNING

Category

GENERIC

Example 53. Binding a relationship variable more than once (when run on version 5.5 or newer)
Query
MATCH (:A)-[r]->(), ()-[r]->(:B) RETURN r
Description of the returned code

A relationship is referenced more than once in the query, which leads to no results because relationships must not occur more than once in each result. (Relationship r was repeated)

Suggestions for improvement

Use one pattern to match all relationships that start with a node with the label A and end with a node with the label B:

MATCH (:A)-[r]->(:B) RETURN r
Example 54. Binding a variable-length relationship variable more than once (when run on version 5.6 or newer)
Query
MATCH ()-[r*]->()<-[r*]-() RETURN count(*) AS count
Description of the returned code

A variable-length relationship variable is bound more than once, which leads to no results because relationships must not occur more than once in each result. (Relationship r was repeated)