Q:

Find nodes where property is not a specific value without WHERE

A node's property has 6 categories. I'd like to leave all the nodes with this property not equal to one of the categories.
It's easy to do with WHERE like this:
MATCH (a) 
WHERE a.property <> "category" 
RETURN a

I'd like to do it another way without where because it seems to be more efficient. I imagine it like this:
MATCH ( a {property <> "category"} ) 
RETURN a

Is it possible?

A:

Neo4j MATCH does not have a syntax to inline WHERE NOT <property>=<value>. Furthermore, Cypher is declarative, meaning it only defines what to return, not how to return it. So MATCH (n{id:1}) is equivalent (in execution) to MATCH (n) WHERE n.id=1. The only time WHERE vs inline produces different execution plans is when you don't pair the WHERE clause with the MATCH. By trying to "optimize" your cypher for execution, most of the time you will just be getting in the Cypher planners way. (Unless your original cypher was over complicated)

