cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Index creation

CREATE INDEX ON:employee(p_id)
 
 
i am getting error
Invalid create index syntax, use `CREATE INDEX FOR ...` instead. (line 1, column 1 (offset: 0))
"CREATE INDEX ON:employee(p_id)"
1 ACCEPTED SOLUTION

glilienfield
Ninja
Ninja

CREATE INDEX FOR (n:employee) ON (n:p_id)

you may want to name the index instead of it given a default name. 

CREATE INDEX employee_p_id FOR (n:employee) ON (n:p_id)

 

https://neo4j.com/docs/cypher-manual/current/indexes-for-search-performance/#administration-indexes-...

View solution in original post

1 REPLY 1

glilienfield
Ninja
Ninja

CREATE INDEX FOR (n:employee) ON (n:p_id)

you may want to name the index instead of it given a default name. 

CREATE INDEX employee_p_id FOR (n:employee) ON (n:p_id)

 

https://neo4j.com/docs/cypher-manual/current/indexes-for-search-performance/#administration-indexes-...