Database Reference
In-Depth Information
start user=node(1,2)
set user.group = 'ADMINISTRATOR'
Neo4j doesn't allow null property values on graph entities. In effect, a null property value
is treated as a non-existent property. So if you want to remove a property, you would use
the delete command. This is demonstrated in the following snippet:
start n=node(1)
delete n.group;
Graph-mutating operations in Cypher are a relatively new feature of Neo4j at the time of
writing. We've demonstrated some useful examples that should get you going. For more
detailed and up-to-date information on the evolving Cypher syntax, see the Neo4j Manual
at http://docs.neo4j.org/chunked/stable/cypher-query-lang.html .
Schema indexing in Cypher
In chapter 5 we introduced the concept of schema indexing, and the improved automatic
indexing feature of Neo4j, where indexes are fully maintained by the Neo4j engine as part
of a node's lifecycle. You also learned how to use schema indexing from Java code. It's
possible to perform all schema-indexing operations from Cypher as well.
The detailed description of the Cypher syntax required to achieve this is out of scope for
this topic, but you can consult the Neo4j Manual for all the details ( http://docs.neo4j.org/
chunked/stable/query-schema-index.html ) .
Note that graph-mutating operations in Neo4j don't support updates to manually created
indexes. If you need to index your newly created nodes using custom indexes (not schema
indexes), you'll have to use the Neo4j Core Java API, language bindings, or REST API.
We've covered a lot about Cypher so far, but there's much more to it under the surface. In
the next section we'll look at some of the other Cypher goodies.
Search WWH ::




Custom Search