2
votes

I am experimenting with neo4j cypher query language and I run into problem with these expressions:

This is valid query expression and returns true:

start n=node(3) return 1 <> 2

But this is not:

start n=node(3) return (1 <> 2) = true

in my opinion it should return also true, but it returns error:

Error: string matching regex \z' expected but=' found

I tried similar queries like (which also fail):

start n = node(3) return not(true = true) = true
start n = node(3) return (true <> true) = true

I am testing queries on http://docs.neo4j.org/chunked/stable/query-where.html when I click on try this query live

Any suggestions? thanks

2
Nice catch... I think this may be fixed in an upcoming build when they redo the parser.Eve Freeman
please file a bug report so it isn't lost, github.com/neo4j/neo4j/issuesPeter Neubauer
I reported it, github.com/neo4j/neo4j/issues/843 I don't think it will be fixed shortly..rduga

2 Answers

0
votes

There does appear to be a workaround available.

START n=node(3) 
WITH (1<>2) AS a 
WHERE a = TRUE 
RETURN a
0
votes

Since at least Neo4j Server 3.5.14 this works.