Another Word For It Patrick Durusau on Topic Maps and Semantic Diversity

July 1, 2012

Neo4j 1.8.M05 – In the Details

Filed under: Cypher,Neo4j — Patrick Durusau @ 4:49 pm

Neo4j 1.8.M05 – In the Details

A new milestone of Neo4j that merits your attention!

Download a copy today!

Neo4j continues to struggle with documentation issues.

For example, the blog post that announces Neo4j 1.8.M05 reports under Cypher:

  • String literals can now contain some escape characters, like:
    • CREATE (n {text:”single \’ and double \” quotes”});

As a standards editor, I cringe when I see “…some escape characters, like:” What the hell does “…some escape characters…” mean?

I can’t begin to guess.

It gets even worse if you try to find an answer in the documentation.

Using the PDF version, searching for “escape” I found:

16.10.8. Relationship types with uncommon characters

Sometime your database will have types with non-letter characters, or with spaces in them. Use ` to escape these.

and,

16.11.4. Escaping in regular expressions

If you need a forward slash inside of your regular expression, escape it just like you expect to.

And “…just like you expect to.” would be?

The example at that point illustrates using “\” as an escape character, as in “/Some\/thing/.”

and,

19.3.12. Get typed relationships

Note that the “&” needs to be escaped for example when using cURL from the terminal.

Not only bad writing but annoying as well.

Don’t state a problem without the answer or linking to the answer if it is too long to insert in place. BTW, the answer is to write any “&” character as “%26” (without the quotes).

and,

19.7.5. Add node to index

Associates a node with the given key/value pair in the given index.

Note

Spaces in the URI have to be escaped.

I haven’t gone back to the RFC but I think the correct term here is “encoded” and the encoded character is “%20” (without the quotes).

19.7.9 Find Node By Exact Match has the same issue. (There is an Asciidoc escape issue reported in 30.3.5 but it is of no relevance to Cypher escape character issue.)

Having searched all the current documentation, I can’t say for sure what escape characters Cypher uses or under what circumstances.

Having a small group of insiders who know the real score is fine for smallish hacker projects. Not so good if you are aspiring to be a viable commercial product.

1 Comment

  1. Thanks for reporting! Fixes are one the way.

    Comment by nawroth — July 17, 2012 @ 3:14 am

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.

Powered by WordPress