Neo4j – How to delete unused property keys from browser?
You should be able to clear everything out by: stopping your Neo4j database deleting everything matching data/graph.db/* (look inside the graph.db folder) starting up again.
You should be able to clear everything out by: stopping your Neo4j database deleting everything matching data/graph.db/* (look inside the graph.db folder) starting up again.
CREATE UNIQUE has slightly more obscure semantics than MERGE. MERGE was developed as an alternative with more intuitive behavior than CREATE UNIQUE; if in doubt, MERGE is usually the right choice. The easiest way to think of MERGE is as a MATCH-or-create. That is, if something in the database would MATCH the pattern you are … Read more
Your matching by label is incorrect, the query should be: MATCH (n:User) SET n.surname=”Taylor” RETURN n What you wrote is: “match a user whose label property is User”. Label isn’t a property, this is a notion apart. As Michael mentioned, if you want to match a node with a specific property, you’ve got two alternatives: … Read more
I’m not sure I would agree with the sentiment that a lot of people don’t like SPARQL. SPARQL 1.0 did have some short comings, but it quite nicely addressed what it was designed for, and the new iteration, SPARQL 1.1, builds upon it adding many constructs from SQL that people expected to see in the … Read more
There are a few fundamental difference between them: Data Model Both Neo4j and Datomic can model arbitrary relationships. They both use, effectively, an EAV (entity-attribute-value) schema so they both can model many of the same problem domains except Datomic’s EAV schema also embeds a time dimension (i.e. EAVT) which makes it very powerful if you … Read more
neo4j (2.0.1) does not currently support a uniqueness constraint that covers multiple properties simultaneously. However, I can think of a workaround that might be acceptable, depending on your use cases. Let’s say you want properties a, b, and c to be unique as a group. You can add an extra property, d, that concatenates the … Read more
This should do it: MATCH (n) WHERE NOT n:Label1 AND NOT n:Label2 RETURN n;
Adding values to an array is analogous to incrementing an integer or concatenating a string and is signified the same way, in your case (let c be your [c:contains {id:[12345]}]) c.id = c.id + 1111 // [12345,1111] c.id = c.id + 14567 // [12345,1111,14567] or c.id = c.id + [1111,14567] // [12345,1111,14567]
You can’t do this in Cypher yet. I think it would be a nice feature though, if you want to request it. Edit (thanks for comment pointing it out): You can now do this as of 2.2: MATCH (p:Product) WHERE p.price=”1950″ RETURN keys(p);
MATCH (n:OLD_LABEL {id:14}) REMOVE n:OLD_LABEL SET n:NEW_LABEL Guess this query explains itself.