API version: 0.3.0

---

# List

`list` holds a JSON array, optionally with a definition for its items.

| Value      | Example                 |
| ---------- | ----------------------- |
| JSON array | `["harbour", "museum"]` |

## Settings

| Setting    | Meaning                                                                                                                                                                             |
| ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `items`    | The definition of every item. Without it, items can be anything.                                                                                                                    |
| `nullable` | Only available in the definition of `items`, nowhere else: whether an item can be `null`. As the position of an item is part of the list, `null` is a value there. Default `false`. |

A `vector` can not be the item of a list.

## Storage

| Database      | Stored as                                                | Notes                                                                                           |
| ------------- | -------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
| MongoDB       | array                                                    | (default), the only option                                                                      |
| Neo4j         | not supported                                            | Neo4j lists only hold values of one type and no nested values, `"storage": "graph"` is rejected |
| Elasticsearch | the mapping of the items, Elasticsearch has no list type | search copy                                                                                     |

The [search copy](/reference/databases/elasticsearch.md) is written unless the property or the type sets `"search": false`.
Where a property is stored is explained in [placement](/reference/schemas/placement.md).

## Indices

None for the list itself. The definition of the elements (`items`) can have an `index`, MongoDB then indexes every
element, see [nested properties](/reference/indices.md#nested-properties).

## Limits

MongoDB documents are limited to 16 MB, see [MongoDB](/reference/databases/mongodb.md).

## Example

Schema:

```json
{
  "type": "list",
  "items": {
    "type": "string"
  }
}
```

Input and output:

```json
{
  "data": {
    "tags": [
      "harbour",
      "museum"
    ]
  }
}
```

---

Home: [Ember Nexus API docs](/index.md)

Full site map: [llms.txt](/llms.txt)

Previous: [Object](/reference/schemas/types/object.md)

Next: [Vector](/reference/schemas/types/vector.md)
