16.1. Indexes

16.1.1. Create index on a label
16.1.2. Drop index on a label

Cypher allows the creation of indexes over a property for all nodes that have a given label. These indexes are automatically managed and kept up to date by the database whenever the graph is changed.

16.1.1. Create index on a label

To create an index on a property for all nodes that have a label, use CREATE INDEX ON. Note that the index is not immediately available, but will be created in the background. See the indexes section for details.

Query. 

CREATE INDEX ON :Person(name)

Nothing

Result

Indexes added: 1

(empty result)


16.1.2. Drop index on a label

To drop an index on all nodes that have a label, use the DROP INDEX clause

Query. 

DROP INDEX ON :Person(name)

Nothing

Result

Indexes removed: 1

(empty result)