José Alejandro
José Alejandro

Reputation: 131

Can't execute cypher match queries in Neo4j JAVA

I'm trying to perform this query using ExecuteEngine:

ExecutionResult result = engine.execute("match n-[:MOVE_TO]->(x) where n.name = \"-999622097\" return x");

But I get this error:

expected START or CREATE

There are any way to perform a MATCH query in JAVA? without using START?

Tk!

Upvotes: 1

Views: 170

Answers (1)

William Lyon
William Lyon

Reputation: 8546

Your query is missing the parens around n. Try this:

MATCH (n:Person)-[:MOVE_TO]->(x) WHERE n.name ="-999622097" RETURN x

Upvotes: 1

Related Questions