By Neo4j Staff | January 12, 2012 download, and you can try it out right now on Heroku. Enjoy!
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
putIfAbsentwhich 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
getOrCreatesimultaneously, only one entity will be created for each key-value pair. This functionality is also exposed through the REST API, via a
|Alistair Jones and Julian Simpson|
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.
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.
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
Share your Graph Story?
Email us: email@example.com
Have a Graph Question?
Reach out and connect with the Neo4j staff.Stackoverflow
Popular Graph Topics
- nosql (96)
- cypher (60)
- emil eifrem (60)
- graphconnect (50)
- release (38)
- community (37)
- graph visualization (33)
- facebook (31)
- Big Data (31)
- graph database (27)