BUG? Regex in WHERE not working in RC1 as they did in 1.8M06

17 views
Skip to first unread message

Michael Janiak

unread,
Oct 1, 2012, 12:06:38 PM10/1/12
to ne...@googlegroups.com
Hi there,

This command works in Neo4j 1.8M06:

START n=node:__types__(className='com.app.MyNode')
WHERE n.name=~ /.*restaurant.*/
RETURN n

However, when I try it in Neo4j - Graph Database Kernel 1.8 or 1.8.RC1, I get one of these:

Invalid query

illegal value
"WHERE n.name=~ /.*restaurant.*/"
                 ^

Is there a new way to do this now? Should I update to 1.8.RC2?

Thank you in advance!

Michael

Wes Freeman

unread,
Oct 1, 2012, 12:11:13 PM10/1/12
to ne...@googlegroups.com
Take off the / / and put " " instead.

http://console.neo4j.org/r/d9csa1

Check the first note in the Change Log for Cypher:

Wes


Michael

--
 
 

Duane Nickull

unread,
Oct 1, 2012, 8:00:47 PM10/1/12
to ne...@googlegroups.com
Michael:

I think in 1.8 release they moved away from the slashes (/*/) regular
expression literals. I recall seeing a note about it but cannot find it.
Might be worth checking out.

Strikes me there is a need for a quick start or cheat sheet for Cypher.
Has anyone written one similar to the dZone articles?

Duane Nickull
***********************************
Technoracle Advanced Systems Inc.
Consulting and Contracting; Proven Results!
i. Neo4J, PDF, Java, LiveCycle ES, Flex, AIR, CQ5 & Mobile
b. http://technoracle.blogspot.com
t. @duanechaos
"Don't fear the Graph! Embrace Neo4J"
--




Wes Freeman

unread,
Oct 1, 2012, 1:31:46 PM10/1/12
to ne...@googlegroups.com
The cheat sheet is at:

It is, however, not updated for 1.8RC1, yet!

Wes

--



Peter Neubauer

unread,
Oct 1, 2012, 1:31:57 PM10/1/12
to ne...@googlegroups.com
here you go! http://neo4j.org/resources/cypher - we will put it in a
more prominent place (it's not quite up to date).

As always, the manual is the single source of truth, so in
1.9-SNAPSHOT, you have
http://docs.neo4j.org/chunked/snapshot/query-where.html#where-case-insensitive-regular-expressions


Cheers,

/peter neubauer

G: neubauer.peter
S: peter.neubauer
P: +46 704 106975
L: http://www.linkedin.com/in/neubauer
T: @peterneubauer

Wanna learn something new? Come to http://graphconnect.com
> --
>
>

Duane Nickull

unread,
Oct 1, 2012, 9:45:11 PM10/1/12
to ne...@googlegroups.com
Nice! I use cheat sheets whenever possible n every aspect of life.

One thing that occurs is that it might be nice to use a wiki for this so
people do not have to scroll over comments and others can augment it but
with a viewing function so developers can choose to use or ignore the
comments. This could be built with Neo powering it (a wiki document built
from nodes of Neo provided data with other nodes with a relationship of
[contributed] that can be filtered.

Duane

***********************************
Technoracle Advanced Systems Inc.
Consulting and Contracting; Proven Results!
i. Neo4J, PDF, Java, LiveCycle ES, Flex, AIR, CQ5 & Mobile
b. http://technoracle.blogspot.com
t. @duanechaos
"Don't fear the Graph! Embrace Neo4J"






On 2012-10-01 10:31 AM, "Peter Neubauer"
>--
>
>


Reply all
Reply to author
Forward
0 new messages