Announcement: Neo4j 1.7 GA "Bastuträsk Bänk" released
Congrats to Neo4j for the announcement of Neo4j 1.7! The content of this post was originally published by Peter Neubauer over at the Neo4j blog.
We’re very pleased to announce that Neo4j 1.7 GA, codenamed "Bastuträsk Bänk" is now generally available.
The many improvements ushered in through milestones have been properly
QA’d and documented, making 1.7 the preferred stable version for all
production deployments. Let’s review the highlights.
Welcome to the Enterprise Turbo package
First out is the new GCR cache - it's 10x faster and accommodates 10x more primitives. The GCR smooths out the rough spots that can occur when processing huge graphs with thousands of simultaneous user operations, by directly managing a fixed amount of memory with thread safe operations.
While the other cache types are almost maintenance free and are very effective for general use, the GCR cache’s finer control over memory usage can achieve more consistent responsiveness when tuned correctly. The GCR is a good choice for large cluster deployments where you’re tuning every aspect of your system.
|Andres Taylor - Cypher champion|
The craftsmanship that guides the Cypher language cares deeply about
balancing clarity with comprehensive expressions, working towards a
grammar that naturally matches the questions you would ask a graph. From
the START to the MATCH and the WHERE, the clauses are intentionally
unsurprising; they’re what you’d likely write when describing a question
in an email.
With 1.7, Cypher now has a full range of common math functions for use in the RETURN and WHERE clause. Combined with basic arithmetic, you can now say things like:
START a=node(3), c=node(2) RETURN a.age, c.age, abs(a.age - c.age) START a=node(1) RETURN round(3.141592) START a=node(*) WHERE sqrt(a.prop) > 5 RETURN a START a=node(3) RETURN sign(-17), sign(0.1)
Sometimes it makes sense to consider multiple relationship types at the same time, as in “my friends and my neighbors.” Now Cypher matches allow you to combine relationships into a single path like so:
START me=node(1) MATCH (me)-[:FRIEND|NEIGHBOR]->(fandn) RETURN fandn
Similarly, in the WHERE clause you might want to accept a few different values for a property. Cypher’s IN operator let’s you present the alternatives in a collection like this:
START a=node(3, 1, 2) WHERE a.name IN ["Peter", "Tobias"] RETURN a
Collections may contain more than you want, so you can pick what elements of the collection to return with HEAD, TAIL, LAST or FILTER.. To complement the ‘?’ operator for optional properties, the new missing property operator ‘!’ defaults to a false value when the property is missing. Consider the difference in these two statements:
START n=node(*) WHERE n.belt? = 'white' AND n.age>32 RETURN n START n=node(*) WHERE n.belt! = 'white' AND n.age>32 RETURN n
With the optional operator ‘?’ you’d get all the nodes with age greater than 32, and if they have a belt, it must be white. With the missing operator ‘!’ you’d get all the nodes with an age greater than 32, and who *must* have a white belt. In the previous example, we also used a great new convenient notation for indicating all nodes, by
Other notable improvementsLike all of our releases, Neoj 1.7 GA incorporates important performance improvements under the hood and fixes for various bugs - discovered both through the open community and by the field team working with the customers. We try to get them into the open codebase as fast as possible, so everyone can benefit. Other notable features that have been added include:
This is a strong new release that we think you’ll enjoy. For reference and more information on the new features that came in the different milestones, refer back to the 1.7.M01, 1.7.M02 and 1.7.M03 blogs and the changelogs (see above).