3.1.5. Compatibility

Cypher is not a static language. New versions introduce new features and sometimes old features get dropped. Older versions of the language can still be accessed if required. There are two ways to select which version to use in queries.

  1. 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 Section, “Supported Language Versions”). Every Cypher query will use this version, provided the query hasn’t explicitly been configured as described in the next item below.
  2. Setting a version on a query by query basis The other way is on a query by query basis. By simply putting CYPHER 2.3 at the beginning, that particular query will be executed with the version of Cypher included in Neo4j 2.3.

Below is an example using the START clause to access a legacy index:

START n=node:nodes(name = "A")
RETURN n Accessing entities by id via START

In versions of Cypher prior to 2.2 it was also possible to access specific nodes or relationships using the START clause. In this case you could use a syntax like the following:

START n=node(42)

The use of the START clause to find nodes by ID was deprecated from Cypher 2.0 onwards and is now entirely disabled in Cypher 2.2 and up. You should instead make use of the MATCH clause for starting points. See Section 3.3.1, “MATCH” for more information on the correct syntax for this. The START clause should only be used when accessing legacy indexes. Supported Language Versions

Neo4j 3.1 supports the following versions of the Cypher language:

  • Neo4j Cypher 3.1
  • Neo4j Cypher 3.0
  • Neo4j Cypher 2.3

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.