Drop an Index using Cypher - neo4j tutorial - graph database
What is DROP INDEX ON using Cypher in Neo4j?
- You can drop an index using the DROP INDEX ON statement. This will remove the index from the database.
- So, to drop our previously created index, we can use the following statement:
- When the statement succeeds,the following message is displayed:
Relative Tags : neo , neo4j , graph database , neo4j cypher , neo4j python , neo4j tutorial , neo4j download , neograft
View the Schema:
- You can now use the :schema command to verify that the applicable index has been removed from the schema.
- Simply type this:
- You will see that the index is no longer in the schema:
NOTE:-
- The colon(:) operator is used to refer a Node or a Relationship label name.
- The above syntax describes that it drops an existing index created on < property_name> of <label_name> of a Node or a Relationship.
Example -
- This example demonstrates how to drop an INDEX on number property of a CreditCard Node.
Steps to follow:
- Step 1 - Type the below command on Data Browser
- Step 2 - Click on "Execute" button and observe the results.
- It shows that one Index is dropped from the Neo4j Database