Cypher Question and Resource


I have a couple of questions:

  • Is the function "EXISTS' is still valid as :help EXISTS says it is not found?

  • Are there any books on the Cypher language covering in particular details of the language and in particular the reading from CSV (more than just simple examples)

Thank you

Check this book:
Practical Neo4j by Gregory Jordan (Apress) Chapter 5

function exists still valid
and for CQL you can refer below link

Cypher Cheat Sheet is the 3.5 Cypher Ref Card and under Predicates does list Exists. Further this is described at WHERE - Cypher Manual

1 Like

Thank you very much for all you great posts. I have a question. Is the following a Boolean:


and if so, can it be used as is with WHERE and under what condition it is True or False?

If it is Boolean and becomes True if the relationship exists, then why do we use EXISTS?

It is still strange that the help command with Neo4j says this is not found but using it does nto return any exceptions, etc.

but within the browser running :help help provides the top root of the available :help options. Even if you look at :help cypher you will see not :help exists but you also dont see a :help size or a :help any etc.

also check out WHERE - Cypher Manual which indicates Filter on patterns
Patterns are expressions in Cypher, expressions that return a list of paths. List expressions are also predicates — an empty list represents false, and a non-empty represents true.

MATCH (timothy { name: 'Timothy' }),(others)
WHERE IN ['Andy', 'Peter'] AND (timothy)<--(others)
RETURN, others.age

It's basically syntactic sugar, the pattern expression is internally rewritten into an exists operation if used in a boolean predicate context.

In another context it results in a list of paths.