18.9. Automatic Indexes

18.9.1. Find node by exact match from an automatic index
18.9.2. Find node by query from an automatic index

18.9.1. Find node by exact match from an automatic index

Automatic index nodes can be found via exact lookups with normal Index REST syntax.

Figure 18.53. Final Graph


Example request

  • GET http://localhost:7474/db/data/index/auto/node/name/I
  • Accept: application/json

Example response

  • 200: OK
  • Content-Type: application/json
[ {
  "outgoing_relationships" : "http://localhost:7474/db/data/node/317/relationships/out",
  "data" : {
    "name" : "I"
  },
  "traverse" : "http://localhost:7474/db/data/node/317/traverse/{returnType}",
  "all_typed_relationships" : "http://localhost:7474/db/data/node/317/relationships/all/{-list|&|types}",
  "property" : "http://localhost:7474/db/data/node/317/properties/{key}",
  "self" : "http://localhost:7474/db/data/node/317",
  "outgoing_typed_relationships" : "http://localhost:7474/db/data/node/317/relationships/out/{-list|&|types}",
  "properties" : "http://localhost:7474/db/data/node/317/properties",
  "incoming_relationships" : "http://localhost:7474/db/data/node/317/relationships/in",
  "extensions" : {
  },
  "create_relationship" : "http://localhost:7474/db/data/node/317/relationships",
  "paged_traverse" : "http://localhost:7474/db/data/node/317/paged/traverse/{returnType}{?pageSize,leaseTime}",
  "all_relationships" : "http://localhost:7474/db/data/node/317/relationships/all",
  "incoming_typed_relationships" : "http://localhost:7474/db/data/node/317/relationships/in/{-list|&|types}"
} ]

18.9.2. Find node by query from an automatic index

See Find node by query for the actual query syntax.

Figure 18.54. Final Graph


Example request

  • GET http://localhost:7474/db/data/index/auto/node/?query=name:I
  • Accept: application/json

Example response

  • 200: OK
  • Content-Type: application/json
[ {
  "outgoing_relationships" : "http://localhost:7474/db/data/node/316/relationships/out",
  "data" : {
    "name" : "I"
  },
  "traverse" : "http://localhost:7474/db/data/node/316/traverse/{returnType}",
  "all_typed_relationships" : "http://localhost:7474/db/data/node/316/relationships/all/{-list|&|types}",
  "property" : "http://localhost:7474/db/data/node/316/properties/{key}",
  "self" : "http://localhost:7474/db/data/node/316",
  "outgoing_typed_relationships" : "http://localhost:7474/db/data/node/316/relationships/out/{-list|&|types}",
  "properties" : "http://localhost:7474/db/data/node/316/properties",
  "incoming_relationships" : "http://localhost:7474/db/data/node/316/relationships/in",
  "extensions" : {
  },
  "create_relationship" : "http://localhost:7474/db/data/node/316/relationships",
  "paged_traverse" : "http://localhost:7474/db/data/node/316/paged/traverse/{returnType}{?pageSize,leaseTime}",
  "all_relationships" : "http://localhost:7474/db/data/node/316/relationships/all",
  "incoming_typed_relationships" : "http://localhost:7474/db/data/node/316/relationships/in/{-list|&|types}"
} ]