Skip to main content

List

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

ValueExample
JSON array["harbour", "museum"]

Settings

SettingMeaning
itemsThe definition of every item. Without it, items can be anything.
nullableOnly 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

DatabaseStored asNotes
MongoDBarray(default), the only option
Neo4jnot supportedNeo4j lists only hold values of one type and no nested values, "storage": "graph" is rejected
Elasticsearchthe mapping of the items, Elasticsearch has no list typesearch copy

The search copy is written unless the property or the type sets "search": false. Where a property is stored is explained in placement.

Indices

None for the list itself. The definition of the elements (items) can have an index, MongoDB then indexes every element, see nested properties.

Limits

MongoDB documents are limited to 16 MB, see MongoDB.

Example

Schema:

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

Input and output:

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