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.

How to add index and rename index name with apoc

1.call apoc.cypher.run('CREATE INDEX idx_name FOR (n:Lable) ON (n.pro)', {})
Error: Schema operations are not allowed for user 'neo4j' with roles [admin] restricted to TOKEN_WRITE.
2.apoc.schema.assert() cant rename index name

other function can update index name ??

5 REPLIES 5

Hello @Noone and welcome to the Neo4j community

You can't rename an index, you must delete it and create the new one with the new name.

Regards,
Cobra

hi , Thanks for your reply ~ how can i create the a new index with new index_name . i just want to create a new index , but dont know how to set a index_name with apoc

Wait, are you talking about indexes or properties? If it's indexes, you don't need APOC for this

indexes . In my java project , use apoc manage neo4j data , so i want to use APOC add index and idx_name , like "CREATE INDEX idx_name FOR (n:Lable) ON (n.pro)"

What do you absolutely want to use APOC? You can write a Cypher query for this.