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 is written unless the property or the type sets "search": false. Where a property is stored is explained in .
Indices
None for the list itself. The definition of the elements (items) can have an index, MongoDB then indexes every element, see nested .
Limits
MongoDB documents are limited to 16 MB, see .
Example
Schema:
{ "type": "list", "items": { "type": "string" }}Input and output:
{ "data": { "tags": [ "harbour", "museum" ] }}