Solving the “Store copy failed due to store ID mismatch” error

It is possible that after seeding a cluster or restoring from a backup, you may encounter the following error while starting your cluster: ERROR [o.n.c.c.s.s.CoreStateDownloader] Store copy failed due to store ID mismatch In most of the cases, this issue… Read more →

Creating and working with linked lists in Cypher

At some point when working with a graph, you may want to create a linked list out of some nodes. If each of the nodes to be linked has its own variable, this is easy, you just do a CREATE… Read more →

Conditional Cypher Execution

At some point you’re going to write a Cypher query requiring some conditional logic, where you want different Cypher statements executed depending on the case. At this point in time Cypher does not include native conditional functionality to address this… Read more →

Using AWS CLI to upload/download files to Amazon S3 bucket

If one has installed the AWS CLI To download a file from a S3 bucket anonymously run aws s3 cp s3://<AWS instance name>/<bucket_Name>/<file> <file> –no-sign-request and/or to upload to a Neo4j S3 buck anonymously run aws s3 cp <file> s3://<AWS… Read more →

Linux Out of Memory killer

The Out Of Memory Killer or OOM Killer is a process that the linux kernel employs when the system is critically low on memory. This situation occurs because the linux kernel has over allocated memory to its processes. When a… Read more →

How to use the BI Connector on the Command Line

This article describes how to use the BI Connector integration with SQLLine. Prerequisites Ensure that you are running Neo4j server 3.5.x or 4.x, and have installed at least version 3.5.0.9 or 4.0.0.4 of the APOC library respectively. Building SQLLine Build… Read more →

Enabling GC Logging

What is Garbage collection and why enabling it? A garbage collection event is a complete pause of the java application (ie: neo4j-server). It can be identified in the debug.log as a stop-the-world event. For example: If you notice issues with… Read more →

How does apoc.periodic.iterate work with resources?

How does apoc.periodic.iterate work? For example, when running call apoc.periodic.iterate(“MATCH (n) RETURN n”, “DETACH DELETE n”, {batchSize:1000}) does it append a LIMIT to the MATCH RETURN so that it only returns the batchSize or does it return everything but it… Read more →

Neo4j: Convert string to date

Neo4j 3.4 saw the introduction of the temporal date type, and while there is now powerful in built functionality, converting strings to dates is still a challenge. If our string is in the format yyyy-MM-dd we can call the date… Read more →

Using explicit indexes for text search

Please note that in Neo4j 3.5 FullText search is available in Neo4j as part of Cypher stored procedures. More documentation is found here: https://neo4j.com/docs/cypher-manual/3.5/schema/index/#schema-index-fulltext-search. As of Neo4j 3.4.x, the schema index is optimal for indexing exact property values, but does… Read more →

Fast counts using the count store

Neo4j maintains a transactional count store for holding count metadata for a number of things. The count store is used to inform the query planner so it can make educated choices on how to plan the query. Obtaining counts from… Read more →

Neo4j’s commit process explained

This article will try to guide you through Neo4j’s commit and replication processes both for single instances and causal clusters.   Single Instance When you call tx.commit(), the transaction will go through the Storage Engine which will transform that transaction… Read more →

Database was successfully initialized, but failed to start

Sometimes when the database does not start it could be something as simple as unnecessary characters in the neo4j.conf file. For example if you add space and/or tab characters to below setting: dbms.ssl.policy.client_policy.private_key=/var/lib/neo4j/certificates/client_policy/neo4j.key The database will fail to start and… Read more →

How to check for time range overlap in Cypher

Neo4j 3.4 introduced temporal types into Cypher, so now we have dates, dateTimes, and their local versions, too, as well as durations. While we don’t have a type for time ranges, we can use two temporal instants as the start… Read more →

Understanding causal cluster size scaling

The ability to safely scale down the size of a causal cluster affords us more robustness for instance failures, provided we maintain quorum as the failures take place. Prior to 3.4, we used a single config property to define both… Read more →

Using apt to download a specific Neo4j debian package

By default, using apt-get to install Neo4j allows you to grab the current and previous stable releases. However, if you would like to install an older version, you can specify that. For reference, the Debian repo is located here: http://debian.neo4j.org/… Read more →

Why do my deleted property keys appear?

When using the Neo4j Browser and selecting the left frame and top icon entitled Database Information or using the built in stored procedure db.propertyKeys() you may see property keys which are no longer associated with any nodes. This is expected.… Read more →

Understanding memory consumption

So you have configured Neo4j to use 4GB of heap and 6GB of page cache and sat back relaxed, thinking the Java process would not go above 10GB in your 12GB machine only to realise that Neo4j had an OOM… Read more →

Achieving longestPath Using Cypher

While Cypher is optimized for finding the shortest path between two nodes, with such functionality as shortestPath(), it does not have the same sort of function for longest path. In some cases, you may want this, and not the shortest… Read more →

Pass Temporal Objects as Parameters

With the support of datetime types in Neo4j, users might wonder how or if it works to transport those types along with other data types via the drivers. It is possible and supported to send temporal objects using one of… Read more →

Explanation of lucene-1.0: Too many open files error

If one encounters a ‘Too many open files’ error in their $NEO4J_HOME/logs/debug.log similar to Caused by: java.nio.file.FileSystemException: /data/neo4j/db/schema/index/lucene_native-2.0/1612/lucene-1.0: Too many open files at sun.nio.fs.UnixException.translateToIOException(UnixException.java:91) at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102) at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107) at sun.nio.fs.UnixFileSystemProvider.newDirectoryStream(UnixFileSystemProvider.java:427) at java.nio.file.Files.newDirectoryStream(Files.java:457) this can be addressed by setting in your… Read more →

What Works with the BI Connector

This article provides an overview of what third-party applications to expect the BI connector work with. Prerequisites Ensure that you are running Neo4j server 3.5.x or 4.x, and have installed at least version 3.5.0.9 or 4.0.0.4 of the APOC library… Read more →

Explanation of error “Cannot merge node using null property value for”

When running a MERGE, which is a combination of MATCH and/or CREATE one may encounter an error of Cannot merge node using null property value for if the MERGE is performing a MATCH against a null property. For example, when… Read more →

Fulltext search in Neo4j

Please note that in Neo4j 3.5 fulltext search is available in Neo4j as part of Cypher stored procedures. More documentation is found here: https://neo4j.com/docs/cypher-manual/3.5/schema/index/#schema-index-fulltext-search. Fulltext search in Neo4j is supported by means of fulltext schema indexes. Fulltext schema indexes are… Read more →

How to use the BI Connector with Tableau Desktop

This article describes how to use the BI Connector integration with Tableau Desktop. Prerequisites Ensure that you are running Neo4j server 3.5.x or 4.x, and have installed at least version 3.5.0.9 or 4.0.0.4 of the APOC library respectively. Install BI… Read more →