Another milestone is waiting for you – Neo4j 1.6.M03. Highlights in this release are: support for indexing unique entities, array queries in Cypher, and a Lucene update to version 3.5. It’s now available for download, and you can try it out right now on Heroku. Enjoy!

Kernel changes
Rickard Öberg
This release includes a popular feature request: the ability to ensure that key-value pairs for entities are unique!

If you look up entities (nodes or relationships) using an external key, you’ll want exactly one entity to correspond to each value of the key.  For example, if you have nodes representing people, and you look these up using Social Security Number (SSN), you’ll want exactly one node for each SSN.  This is easily achieved if you load all your data sequentially, because you can add a new node each time you meet a value of the key (a new SSN).  However, up to now, it has been awkward to maintain this uniqueness when multiple processes are adding data simultaneously (via web requests for example).

Since this is a common use-case, we’ve improved the API to make it easy to enforce entity uniqueness for a given key-value pair.  At the index level, we’ve added a new method putIfAbsent which ensures that only one entity will indexed for the key-value pair, even if lots of threads are using the same key-value pair at the same time.  Alternatively, if you’d prefer to work with nodes or relationships rather than with the underlying indexes, there’s a higher level API provided by UniqueFactory. This makes it easy to retrieve an entity using get-or-create semantics, i.e. it returns a matching entity if one exists, otherwise it creates one. Again, this mechanism is thread-safe, so it doesn’t matter how many threads call getOrCreate simultaneously, only one entity will be created for each key-value pair. This functionality is also exposed through the REST API, via a ?unique query parameter.
Alistair Jones and Julian Simpson

Cypher
Array properties have been supported in Neo4j for a long time, but until now it wasn’t possible to query on them. This milestone makes it possible to filter on array properties in Cypher. We have also improved aggregation performance.

Lucene upgrade
Neo4j uses Apache Lucene for its indexing features – this allows you to find “entry points” into the graph before starting graph-based queries.  Lucene is an actively developed project in its own right, and is constantly being enhanced and improved.  In this Neo4j release, we’re taking the opportunity to upgrade to a newer stable release of Apache Lucene, so that all users get the benefits of recent enhancements in Lucene.  We’ve moved to Lucene 3.5; for details on all the changes, have a look at their changelog.

Bug fixes
This milestone includes a number of bug fixes. For more information please have a look at the “CHANGES.txt” files in each of our release packages.

Go for it
It’s available on as a hosted cloud service on Heroku right now, or download the packages from our website.  If you’d like to stay up to date with new features in the pipeline, and share your experience with other users, we would love for you to join our community mailing list.

Rickard Öberg, Alistair Jones and Julian Simpson
Developers @ Neo Technology

 

Keywords:  


1 Comment

Leave a Reply

Your email address will not be published. Required fields are marked *

Stay Connected

Go
 

Have a Graph Question?

Stackoverflow
Contact Us


Popular Graph Topics

Archives