Mehran
Mehran

Reputation: 16851

Negating :LABEL in MATCH clause

I'm trying to match nodes that do not have some specific label, like (I know the below syntax is incorrect):

MATCH (n:Includes:!Excludes)
RETURN n;

And I also know I can do this in WHERE clause:

MATCH (n:Includes)
WHERE NOT n:Excludes
RETURN n;

while the above syntax works but since the match clause should always be number one choice and I could not find any indication if this is possible or not, I just thought I should ask (at least for the record).

So the question is:

Is it possible to excludes nodes with some label in match clause?

Upvotes: 0

Views: 82

Answers (1)

InverseFalcon
InverseFalcon

Reputation: 30397

No, as of version 3.1.1 Cypher doesn't have a means of expressing label exclusion in just the MATCH clause.

Upvotes: 1

Related Questions