> ## Documentation Index
> Fetch the complete documentation index at: https://helix-claude-document-return-objects-rxi6v.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Secondary Indexing

> Indexing a field of a node as a global secondary index.

You can create secondary indexes on node fields using the `INDEX` keyword. For enforcing uniqueness constraints, see [Unique Indexes](/documentation/hql/schema/unique-index).

To create a secondary index, use the `INDEX` keyword:

```helixql theme={null}
N::NodeType {
  INDEX field1: String,
  field2: U32
}
```

This internally creates a table for the indexed field.
To query a node by the indexed field, you can use object syntax:

```helixql theme={null}
QUERY getByIndex(index_field: String) =>
    node <- N<User>({field1: index_field})
    RETURN node
```

***

**Note:** You can currently only use indexing with nodes. Indexing for vectors is not supported yet.
