NOT IN in Cypher ?

629 views
Skip to first unread message

Christophe L

unread,
Mar 6, 2012, 8:15:26 AM3/6/12
to Neo4j
Hello,

Is there a way to do a kind of NOT IN in Cypher (Neo4j 1.6.1) please ?
For exemple:

START type_ci=node(1)
WHERE type_ci.name NOT IN ('1','2','3')
RETURN type_ci

In our use case, the value ('1', '2', '3') are coming from an external
system.

Thanks in advance
Best regards,
Christophe

Peter Neubauer

unread,
Mar 6, 2012, 8:25:36 AM3/6/12
to ne...@googlegroups.com
Well,
there is http://docs.neo4j.org/chunked/1.6.1/query-where.html#where-boolean-operations

Cheers,

/peter neubauer

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

Neo4j 1.6 released                 - dzone.com/6S4K
The Neo4j Heroku Challenge   - http://neo4j-challenge.herokuapp.com/

Andres Taylor

unread,
Mar 6, 2012, 8:52:17 AM3/6/12
to ne...@googlegroups.com
No, that does not exist in 1.6.1. It is there in 1.7-SNAPSHOT though.


Andrés

On Tue, Mar 6, 2012 at 2:15 PM, Christophe L <cl.subs...@gmail.com> wrote:

Christophe L

unread,
Mar 7, 2012, 12:14:54 AM3/7/12
to Neo4j
Hi,

Thanks for your answer !

It will make the query a bit "verbose" but as far as it works, it's ok
for me :)

Best regards,
Christophe

On 6 mar, 17:25, Peter Neubauer <peter.neuba...@neotechnology.com>
wrote:
> Well,
> there ishttp://docs.neo4j.org/chunked/1.6.1/query-where.html#where-boolean-op...
>
> Cheers,
>
> /peter neubauer
>
> G:  neubauer.peter
> S:  peter.neubauer
> P:  +46 704 106975
> L:   http://www.linkedin.com/in/neubauer
> T:   @peterneubauer
>
> Neo4j 1.6 released                 - dzone.com/6S4K
> The Neo4j Heroku Challenge   -http://neo4j-challenge.herokuapp.com/
Reply all
Reply to author
Forward
0 new messages