The expressive power of Cypher is already awesome and getting better with the Neo4j 2.0 release. Let’s take a step back from the bleeding edge and see Cypher in 1.9.4 and how it can be translated into Java. First a simple example where we look up a User node by an index and return a list of usernames belonging to the people who are that user’s friends:
START me = node:Users(username='maxdemarzi') MATCH me -[:FRIENDS]-> people RETURN people.username
The Cypher statement expresses what I want even better than my botched explanation in English. So how would we do this in the Neo4j Java API?
Continue reading