I am trying to create unique constrain using accepted answer found at: Neo4jClient - Create index from within Neo4jClient?
I am using Neo4jClient v1.1.0.11
The example is:
graphClient.Cypher
.CreateUniqueConstraint("identity", "property")
.ExecuteWithoutResults();
The problem is that when I execute this example I receive this exception:
SyntaxException: Invalid input ')': expected an identifier character, whitespace or NodeLabel (line 1, column 31 (offset: 30)) "CREATE CONSTRAINT ON (identity) ASSERT property IS UNIQUE" ^
When I use this statement:
client.Cypher
.Create("CREATE CONSTRAINT ON (c:User)ASSERT c.UserId IS UNIQUE")
.ExecuteWithoutResults();
I receive this error:
SyntaxException: Invalid input 'O': expected 'r/R' (line 1, column 16 (offset: 15)) "CREATE CREATE CONSTRAINT ON (c:User)ASSERT c.UserId IS UNIQUE" ^
My question is what is the correct way of creating unique index using Neo4JClient? An example would be appreciated.
Thanks