Prev |  | Next

## 20.20. Legacy Automatic Indexes

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

### 20.20.1. 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`

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

### 20.20.2. 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`

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

Copyright © 2014 Neo Technology

Prev | Up | Next
| Home |