GraphAware Blog - Cypher

Find out what's new in the world of mission-critical graph analytics.

Registering a custom analyzer for phonetic search in Neo4j 4

11 Mar 2021 by Luanne Misquitta · 2 min read Neo4j Cypher Search

Phonetic matching attempts to match words by pronunciation instead of spelling. Words are typically misspelled and exact matches result in them not being found.Algorithms such as Soundex and Metaphone were developed to address this problem and they have found usage in the areas of voice assistants, search, record linking and fraud detection, misspelled names of things (for example, medical records) etc.

Neo4j 4: Multi tenancy

Neo4j 4: Multi tenancy

06 Feb 2020 by Luanne Misquitta · 7 min read Neo4j Cypher

Up until version 4.0, Neo4j has supported only one active database per server instance. As such, achieving multi tenancy meant that either a Neo4j instance had to be deployed per tenant, or all tenant graphs co-existed in the same database.

Neo4j 4: Post-Union Processing Explained

Neo4j 4: Post-Union Processing Explained

17 Jan 2020 by Luanne Misquitta · 9 min read Neo4j Cypher

Many, many years ago, I requested for the Cypher UNION clause in Cypher and Andres Taylor graciously added it.This was followed by the request for Post-Union Processing by Aseem Kishore, and it began to collect a whopping 99 comments over the course of time.

GRANDstack tips and tricks

GRANDstack tips and tricks

18 Nov 2019 by Michal Trnka · 11 min read Neo4j Advanced Cypher

GRANDstack tips and tricksUsing GRANDstack can rapidly accelerate the development of applications. The neo4j-graphql-js library provides the ability to translate GraphQL queries from the frontend to Cypher queries. This is achieved by defining the GraphQL schema and annotating it with a few extra directives. If you want to get familiar with the GRANDstack you can visit their documentation.

Custom analyzer for fulltext search in Neo4j

06 Sep 2019 by František Hartman · 4 min read Neo4j Cypher Search

We have already blogged about fulltext search available in Neo4j 3.5. The list of available analyzers covers many languages and fits various use cases. However once you expose the search to real users they will start pointing out edge cases and complain about the search not being google-like.

Cypher: Using Index Hints

19 Aug 2019 by Luanne Misquitta · 4 min read Neo4j Cypher Intermediate

The Cypher query planner is quite advanced and mature, and you can mostly rely on it to pick the best plan for your query. However, there are rare cases, or bugs, that might want you looking for ways to influence that plan. This article demonstrates practical usage of an index hint.

Avoid cycles in Cypher queries

Avoid cycles in Cypher queries

26 Apr 2019 by Jan Zak · 3 min read Neo4j Beginner Cypher

There is one common performance issue our clients run into when trying their first Cypher queries on a dataset in Neo4j. When writing a query, be sure that it doesn’t match any cycles, or you can experience unpleasant surprises.

Solving the bucket-filling problem with Neo4j

02 Sep 2018 by Vince Bickers · 7 min read Neo4j Cypher

IntroductionIn the bucket filling problem you are given two empty buckets, each of a certain capacity, and a large supply of water. By filling, emptying and transferring water between the two buckets, you must try to end up with a situation where one of the buckets contains a required volume of water, or where both buckets together contain the required volume.

Internationalization with CypherMessageSource, Spring and Neo4j

29 Sep 2016 by Eric Spiegelberg, Guest Author · 6 min read Neo4j SDN Cypher Spring

Whether you realize it or not, the software you create has a global market. Perhaps more so than any other product in any other industry,code that may start as a small, individual effort has the potential to rapidly blossom into a product used around the world.While it is not always obvious that your application can or will have such wide usage, it is in your best interest to maximizethe number of organizations and people you can reach. This means it is important to ensure your software is internationalized and localized.

Graph-Aided Search - The Rise of Personalised Content

20 Apr 2016 by Alessandro Negro, Christophe Willemsen · 26 min read Neo4j Cypher Recommendations Elasticsearch

In our previous blog postwe introduced the concept of Graph Aided Search. It refers to a personalised user experience during search where theresults are customised for each user based on information gathered about them (likes, friends, clicks, buying history, etc.).This information is stored in a graph database and processed using machine learning and/or graph analysis algorithms.

Processing Large Sets of Nodes with Cypher

10 Dec 2015 by Christophe Willemsen · 4 min read Neo4j Cypher

Iterating over large numbers of nodes using Cypher is quite a common use case in Neo4j. Typically, the reason for doing thisis that we want to perform some kind of operation for each one of these nodes. In this blog post, we will use one millionTestNodes and try to iterate over them in order to index their contents into a freshly created Elasticsearch index.There are three approaches we can take, two of which are quite common, but the most performant technique is largely unknown.

Faster Recommendations with Neo4j 2.3 Triadic Selection

20 Oct 2015 by Alessandro Negro, Christophe Willemsen · 8 min read Neo4j Cypher Recommendations

Recently, Neo Technology announced the 2.3.0-RC1 release of their Neo4j graph database. One of the key new features is TriadicSelection built into Cypher’s Cost Based Planner. In this blog post, we will explore the Triadic Selection in detailand demonstrate how significantly it can speed up recommendations computed in Neo4j.

Cypher: Variable Length Relationships by Example

Cypher: Variable Length Relationships by Example

19 May 2015 by Christophe Willemsen, Michal Bachman · 4 min read Neo4j Cypher

In this blog post, we’ll demonstrate how to use variable length relationships (sometimes called “variable length paths”)in Cypher using examples. We will also see when zero length relationships can be useful.