Open In App

Neo4j Drop Index

Last Updated : 27 Aug, 2019
Improve
Improve
Like Article
Like
Save
Share
Report

In neo4j you can drop index for both property and nodes. Indexing is data structure that helps faster performance on retrieval operation on database. There is special features in neo4j indexing once you create indexing that index will manage itself and keep it up to date whenever changes made on the database. Similarly DROP INDEX ON statement will provide the indexing.
Syntax:

DROP INDEX ON:label(node)

Example: In the below example we drop index on the Tag property of all nodes with the GeeksforGeeks label.

  • $ DROP INDEX ON:GeeksforGeeks(Tag)
    

    Output:

  • View Schema: You can use the :schema command to see applicable index is removed from the schema.

  • :schema

    Output:

  • Note: If there is others indexing available then it will show those, basically this command will show all the schema.

    Remember few things to remove anything fast off all remove the relationship first after try the DELETE clause or REMOVE clause it is a good practice. To remove any node you have to remove the relationships, but in case of indexing that is not required. Indexing is the different things that does not effect on database it just increase the accessibility of your database. by removing the index you lost the fast accessing capability.


    Like Article
    Suggest improvement
    Previous
    Next
    Share your thoughts in the comments

    Similar Reads