19.21. Legacy Automatic Indexes

To enable automatic indexes, set up the database for that, see the section called “Configuration”. With this feature enabled, you can then index and query nodes in these indexes.

Find node by exact match from an automatic index

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/65/relationships/out",
  "labels" : "http://localhost:7474/db/data/node/65/labels",
  "data" : {
    "name" : "I"
  },
  "traverse" : "http://localhost:7474/db/data/node/65/traverse/{returnType}",
  "all_typed_relationships" : "http://localhost:7474/db/data/node/65/relationships/all/{-list|&|types}",
  "self" : "http://localhost:7474/db/data/node/65",
  "property" : "http://localhost:7474/db/data/node/65/properties/{key}",
  "properties" : "http://localhost:7474/db/data/node/65/properties",
  "outgoing_typed_relationships" : "http://localhost:7474/db/data/node/65/relationships/out/{-list|&|types}",
  "incoming_relationships" : "http://localhost:7474/db/data/node/65/relationships/in",
  "extensions" : {
  },
  "create_relationship" : "http://localhost:7474/db/data/node/65/relationships",
  "paged_traverse" : "http://localhost:7474/db/data/node/65/paged/traverse/{returnType}{?pageSize,leaseTime}",
  "all_relationships" : "http://localhost:7474/db/data/node/65/relationships/all",
  "incoming_typed_relationships" : "http://localhost:7474/db/data/node/65/relationships/in/{-list|&|types}",
  "metadata" : {
    "id" : 65,
    "labels" : [ ]
  }
} ]

Find node by query from an automatic index

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/56/relationships/out",
  "labels" : "http://localhost:7474/db/data/node/56/labels",
  "data" : {
    "name" : "I"
  },
  "traverse" : "http://localhost:7474/db/data/node/56/traverse/{returnType}",
  "all_typed_relationships" : "http://localhost:7474/db/data/node/56/relationships/all/{-list|&|types}",
  "self" : "http://localhost:7474/db/data/node/56",
  "property" : "http://localhost:7474/db/data/node/56/properties/{key}",
  "properties" : "http://localhost:7474/db/data/node/56/properties",
  "outgoing_typed_relationships" : "http://localhost:7474/db/data/node/56/relationships/out/{-list|&|types}",
  "incoming_relationships" : "http://localhost:7474/db/data/node/56/relationships/in",
  "extensions" : {
  },
  "create_relationship" : "http://localhost:7474/db/data/node/56/relationships",
  "paged_traverse" : "http://localhost:7474/db/data/node/56/paged/traverse/{returnType}{?pageSize,leaseTime}",
  "all_relationships" : "http://localhost:7474/db/data/node/56/relationships/all",
  "incoming_typed_relationships" : "http://localhost:7474/db/data/node/56/relationships/in/{-list|&|types}",
  "metadata" : {
    "id" : 56,
    "labels" : [ ]
  }
} ]