Neo4j Drop Index

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.



    My Personal Notes arrow_drop_up

    Check out this Author's contributed articles.

    If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

    Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.




    Article Tags :
    Practice Tags :


    Be the First to upvote.


    Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.