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.

Neo.ClientNotification.Statement.CartesianProduct

When is this notification returned?

Whenever there is a cartesian product in the plan.

Table 1. Notification category 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

Neo.ClientNotification.Statement.UnboundedVariableLengthPattern

When is this notification returned?

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

Table 2. Notification category 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

Neo.ClientNotification.Statement.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 planning.

Table 3. Notification category 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

Neo.ClientNotification.Statement.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 category 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)

Neo.ClientNotification.Statement.EagerOperator

When is this notification returned?

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

Table 5. Notification category 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

Neo.ClientNotification.Statement.DynamicProperty

Table 6. Notification category 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

Neo.ClientNotification.Statement.CodeGenerationFailed

Table 7. Notification category 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.

Neo.ClientNotification.Statement.JoinHintUnfulfillableWarning

Table 8. Notification category 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.

Neo.ClientNotification.Schema.HintedIndexNotFound

Table 9. Notification category 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.

Neo.ClientNotification.Database.HomeDatabaseNotFound

Table 10. Notification category 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.

Neo.ClientNotification.Statement.UnknownLabelWarning

Table 11. Notification category 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.

Neo.ClientNotification.Statement.UnknownRelationshipTypeWarning

Table 12. Notification category 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.

Neo.ClientNotification.Statement.UnknownPropertyKeyWarning

Table 13. Notification category 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.

Neo.ClientNotification.Statement.RuntimeUnsupportedWarning

Table 14. Notification category 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 *

Neo.ClientNotification.Statement.RuntimeExperimental

Table 15. Notification category 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.

Neo.ClientNotification.Statement.FeatureDeprecationWarning

Table 16. Notification category details

Code

Neo.ClientNotification.Statement.FeatureDeprecationWarning

Title

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

Severity

WARNING

Category

DEPRECATION

Example 17. Repeated variable length relationship variable inside the same pattern, with same relationship type (when run on a 5.x release)
Query
MATCH ()-[r:PARENT*]-()
MATCH ()-[r:PARENT*]-()
RETURN *
Description of the returned code

Using an already bound variable for a variable length relationship is deprecated and will be removed in a future version. (the repeated variable is: r)

Suggestions for improvement

Inside a single pattern, we have relationship uniqueness, which means that this query never will return any rows and should therefore be rewritten to the wanted behavior.

Example 18. Repeated variable length relationship across patterns, with the same relationship type
Query
MATCH ({name:"Molly"})-[r:KNOWS*]->({name:"Kalle"})
MATCH ({age:25})-[r:KNOWS*]->({age:21})
RETURN r
Description of the returned code

Using an already bound variable for a variable length relationship is deprecated and will be removed in a future version. (the repeated variable is: r)

Suggestions for improvement

Since the relationships in the first and second match must be the same, we know that the start node and the end node are the same. In the query above, we could therefore concatenate the predicates from the two matches and create a single match:

MATCH ({name:"Molly", age:25})-[r:KNOWS*]->({name:"Kalle", age:21})
RETURN r
Example 19. Repeated variable length relationship across patterns with different relationship types
Query
MATCH ()-[r:PARENT*]-()
MATCH ()-[r:CHILD*]-()
RETURN *
Description of the returned code

Using an already bound variable for a variable length relationship is deprecated and will be removed in a future version. (the repeated variable is: r)

Suggestions for improvement

Since the relationships in the first and second match must be the same, and a single relationship can’t have multiple relationship types, this query will never return any rows.

Example 20. 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 21. 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 22. 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 23. 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 24. 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 25. 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' is no longer supported)

Suggestions for improvement

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

Example 26. 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 27. 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'}

Neo.ClientNotification.Request.DeprecatedFormat

Table 17. Notification category details

Code

Neo.ClientNotification.Request.DeprecatedFormat

Title

The client requested a deprecated format.

Severity

WARNING

Category

DEPRECATION

GENERIC category

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

Neo.ClientNotification.Statement.SubqueryVariableShadowing

Table 18. Notification category 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 28. 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 *

Neo.ClientNotification.Statement.ParameterNotProvided

Table 19. Notification category 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 29. 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.

Neo.ClientNotification.Procedure.ProcedureWarning

Table 20. Notification category details

Code

Neo.ClientNotification.Procedure.ProcedureWarning

Title

The query used a procedure that generated a warning.

Severity

WARNING

Category

GENERIC