To enable automatic indexes in neo4j, set up the database for that, see Section 19.12.1, “Configuration”. With this feature enabled, you can then index and query nodes in these indexes.
Automatic index nodes can be found via exact lookups with normal Index REST syntax.
Example request
GET
http://localhost:7474/db/data/index/auto/node/name/I
Accept:
application/json; charset=UTF-8
Example response
200:
OK
Content-Type:
application/json; charset=UTF-8
[ { "outgoing_relationships" : "http://localhost:7474/db/data/node/358/relationships/out", "data" : { "name" : "I" }, "traverse" : "http://localhost:7474/db/data/node/358/traverse/{returnType}", "all_typed_relationships" : "http://localhost:7474/db/data/node/358/relationships/all/{-list|&|types}", "property" : "http://localhost:7474/db/data/node/358/properties/{key}", "self" : "http://localhost:7474/db/data/node/358", "outgoing_typed_relationships" : "http://localhost:7474/db/data/node/358/relationships/out/{-list|&|types}", "properties" : "http://localhost:7474/db/data/node/358/properties", "incoming_relationships" : "http://localhost:7474/db/data/node/358/relationships/in", "extensions" : { }, "create_relationship" : "http://localhost:7474/db/data/node/358/relationships", "paged_traverse" : "http://localhost:7474/db/data/node/358/paged/traverse/{returnType}{?pageSize,leaseTime}", "all_relationships" : "http://localhost:7474/db/data/node/358/relationships/all", "incoming_typed_relationships" : "http://localhost:7474/db/data/node/358/relationships/in/{-list|&|types}" } ]
See Find node by query for the actual query syntax.
Example request
GET
http://localhost:7474/db/data/index/auto/node/?query=name:I
Accept:
application/json; charset=UTF-8
Example response
200:
OK
Content-Type:
application/json; charset=UTF-8
[ { "outgoing_relationships" : "http://localhost:7474/db/data/node/349/relationships/out", "data" : { "name" : "I" }, "traverse" : "http://localhost:7474/db/data/node/349/traverse/{returnType}", "all_typed_relationships" : "http://localhost:7474/db/data/node/349/relationships/all/{-list|&|types}", "property" : "http://localhost:7474/db/data/node/349/properties/{key}", "self" : "http://localhost:7474/db/data/node/349", "outgoing_typed_relationships" : "http://localhost:7474/db/data/node/349/relationships/out/{-list|&|types}", "properties" : "http://localhost:7474/db/data/node/349/properties", "incoming_relationships" : "http://localhost:7474/db/data/node/349/relationships/in", "extensions" : { }, "create_relationship" : "http://localhost:7474/db/data/node/349/relationships", "paged_traverse" : "http://localhost:7474/db/data/node/349/paged/traverse/{returnType}{?pageSize,leaseTime}", "all_relationships" : "http://localhost:7474/db/data/node/349/relationships/all", "incoming_typed_relationships" : "http://localhost:7474/db/data/node/349/relationships/in/{-list|&|types}" } ]
Copyright © 2013 Neo Technology