When I try to create an index on a class with a name, it gives error.
The SQL is as under and the error.
On the other hand if I create without the name, it creates the index. I have referred: CREATE INDEX, it talks about manual index names, which is not clear to me; I take it that it is the name of the index (traditionally).
Could anyone point me to the right direction of why the below statement is not working and what is the right way of creating an index with name.
CREATE INDEX idxName IF NOT EXISTS ON GeneralizedInformationRoot (name) UNIQUE;
The error
Cannot execute command Encountered "(" "(" at line 1, column 66. Was expecting one of: <EOF> <NULL_STRATEGY> ... <METADATA> ... ";" ... "," ...
Try removing the name, like this:
In the link you provided states:
In your case the index is automatic, so the name is automatically assigned.