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 →

Explore:  


Explanation of error “WebSocket connection failure. Due to security constraints in your web browser, the reason for the failure is not available to this Neo4j Driver…​

In Neo4j 3.0 and its implementation of the Bolt protocol, if a remote browser connects to Neo4j (http://<remote_neo4j_host>:7474) and attempts to authenticate, the following error may be encountered: WebSocket connection failure. Due to security constraints in your web browser, the… Read more →

Explore:  


How to estimate initial memory configuration

The initial and eventual memory configuration parameters can be a moving target, based on how your store changes in size and how your workload increases or changes over time. This guidance is meant for the initial configuration. In order to… Read more →

Explore:  


How deletes work in Neo4j

Neo4j uses logical deletes to delete from the database to achieve maximum performance and scalability. To understand how this might appear to an operator of the database, lets take a simple case of loading data into Neo4j. When you start… Read more →

Explore:  


Troubleshooting Connection Issues in Neo4j Browser and Cypher Shell

This page describes common issues users may encounter in connecting Neo4j Browser or cypher-shell to a Neo4j database, and how to address them. Connection Timeout Symptom: connection attempts lag for a long time, and then fail with connection timed out… Read more →

Explore:  


How do I use LOAD CSV with data including quotes

When using LOAD CSV to read a file which includes data with double quote characters (“), the quotes need to be escaped as 2 double quote characters For example if your data file (courses.csv) included the following content COURSE_ID|COURSE_TITLE 1215,”””Graphs… Read more →

Explore:  


How do I convert Neo4j logs from base UTC to local timezone

With the introduction of Neo4j 3.3.1 it is possible to represent date timestamps in your $NEO4J_HOME/logs/* in either UTC or SYSTEM timezone through the implementation of dbms.logs.timezone However for prior releases all Neo4j logs will preface each line with a… Read more →

Explore:  


How do I zoom in/out within the graph visualization of the browser?

Within the graph visualization pane of the browser (reached locally at http://localhost:7474), to zoom in/out of the graph display one first needs to select Full Screen mode. The zoom in/out controls are located in the bottom-right corner. To enter Full… Read more →

Explore:  


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 →

Explore:  


Understanding Neo4j’s data on disk

Neo4j database files are persisted to storage for long term durability. Data related files located in data/databases/graph.db (v3.x+) by default in the Neo4j data directory. Below will give you an idea of the type of files you’ll find, prefaced with… Read more →

Explore:  


Understanding transaction and lock timeouts

One way to handle runaway queries is to impose a time limit that will terminate a query when exceeded. There are some subtleties here that need to be understood to ensure proper behavior and avoid confusion. Defining a transaction timeout… Read more →

Explore:  


Manually Migrating Configuration Settings from Neo4j 2.x to Neo4j 3.x

One of the major changes in Neo4j 3.0 was the reworking of configuration files and the individual configuration setting naming convention to make it more consitent and managable going forward. A config-migrator tool is supplied in Neo4j 3.0 to assist… Read more →

Explore:  


How to logrotate neo4j.log file

The neo4j.log file is a redirection to STDOUT. When you implement a default logrotate strategy, Neo4j will not be able to write to that file anymore after a rotation. Solution You can use “copytruncate” in your logrotate configuration file. Example… Read more →

Explore:  


Alternatives to UNION queries

While UNIONs can be useful for certain cases, they can often be avoided completely with small changes to the query. In this article we’ll present various example cases where a UNION isn’t necessary, and a simple Cypher query will do.… Read more →

Explore:  


How do I define a LOAD CSV FIELDTERMINATOR in hexidecimal notation

When using LOAD CSV one can define the field delimiter used, whereby the default is the ‘,’ character. If you want to override the default this can be accomplished via the paramter FIELDTERMINATOR, for example LOAD CSV WITH HEADERS from… Read more →

Explore:  


How do I define, display, and use parameters with neo4j-shell

bin/neo4j-shell allows for a command line interface to query your graph via Cypher statements and to include parameters to those statements. Usage of parameters, rather than hard coding values, will allow for re-use of the query plan cache. A parameter… Read more →

Explore:  


Long GC Pauses caused by application code calling System.gc()

When investigating the cause of long garbage collection cycles, it is often useful to enable GC logging. You can do so by following the product documentation. Once this is enabled, you can look through the GC log file for signs… Read more →

Explore:  


How do I quickly switch between multiple graphs without modifying neo4j.conf?

If you have multiple graphs set up and want to quickly switch between each without modifying dbms.active_database in conf/neo4j.conf, you can accomplish this with a neo4j restart and with the environment variable NEO4J_CONF defined pointing to the appropriate/corresponding neo4j.conf file.… Read more →

Explore:  


How to get a high level inventory of objects in your graph

The following Cypher can be used to get a simple high level view of the number of objects within your graph database. This may be used if one is trying to compare the contents of two databases: match (n) return… Read more →

Explore:  


How do I achieve the equivalent of a SQL Having clause with Cypher

With a traditional SQL based database a HAVING clause will restrict aggregated values. For example select zipcode, count(*) as population from Person group by zipcode having population>100000; will return all zipcodes which have more than 100k residents. To achieve the… Read more →

Explore:  


Limiting MATCH results per row

Since LIMIT applies to the total number of rows of the query, it can’t be used in cases when matching from multiple nodes where the limit must be on match results per row. Take an example case using the Movies… Read more →

Explore:  


How do I run Consistency Check Manually?

If you skip the Consistency Check part of neo4j-backup, or you want to check that all is well with a data store, you can run the tool against an offline store. $ java -cp ‘lib/*:system/lib/*’ org.neo4j.consistency.ConsistencyCheckTool /tmp/graph.db On a Windows… Read more →

Explore:  


How do I log parameter values into the query.log file

Neo4j 3.0 introduces the ability to log the value of query parameters in the log/query.log file. The settings to control this feature are located in the conf/neo4j.conf file. To enable query logging with parameters, one must first enable query logging… Read more →

Explore:  


How do I specify the field and array delimiter to neo4j-import as a ASCII character

neo4j-import allows one to initially load a graph.db via CSV files. There may be times when using a ‘,’ as a field or array delimiter is not appropriate as your data may contain this character as part of its data.… Read more →

Explore:  


Explanation of error on session connection using uniform drivers

As described by http://neo4j.com/docs/developer-manual/current/drivers/#_trust, when establishing an encrypted connection, it needs to be verified that the remote peer is who we expected to connect to. The default connection is to ‘Trust on first use’ and to do so indicates that… Read more →

Explore: