Note | |
---|---|
This documents schema based indexes, a feature that was introduced in Neo4j 2.0, see Section 19.18, “Legacy indexing” for legacy indexing. |
For more details about indexes and the optional schema in Neo4j, see Section 3.7, “Schema”.
This will start a background job in the database that will create and populate the index.
You can check the status of your index by listing all the indexes for the relevant label.
The created index will show up, but have a state of POPULATING
until the index is ready,
where it is marked as ONLINE
.
Example request
POST
http://localhost:7474/db/data/schema/index/person
Accept:
application/json; charset=UTF-8
Content-Type:
application/json
{ "property_keys" : [ "name" ] }
Example response
200:
OK
Content-Type:
application/json; charset=UTF-8
{ "label" : "person", "property_keys" : [ "name" ] }
Example request
GET
http://localhost:7474/db/data/schema/index/user
Accept:
application/json; charset=UTF-8
Example response
200:
OK
Content-Type:
application/json; charset=UTF-8
[ { "property_keys" : [ "name" ], "label" : "user" } ]
Copyright © 2014 Neo Technology