HenrikBechmann
HenrikBechmann

Reputation: 621

first example merge documentation generates error

on http://docs.neo4j.org/chunked/stable/query-merge.html

first example

MERGE (robert:Critic)
RETURN robert, labels(robert)

generates the following error:

Query:
merge (robert:Critic)
return robert, labels(robert)
Error: Invalid input 'c': expected whitespace, comment, ';' or end of input (line 2, column 1)
"create constraint on (n:`Person`) assert n.`role` is unique"
 ^

presumably from the setup statement:

Graph Setup:
create constraint on (n:`Person`) assert n.`name` is unique
create constraint on (n:`Person`) assert n.`role` is unique
...

Upvotes: 1

Views: 44

Answers (1)

Ron van Weverwijk
Ron van Weverwijk

Reputation: 547

It's not possible to create multiple constraints through the webconsole in one go.

In the web console you need to run the create constraints as separate statements.

Through the neo4j-shell you can run the complete 'script'.

Upvotes: 1

Related Questions