Integer
integer holds whole numbers.
| Value | Example |
|---|---|
| whole number from -2^63 to 2^63-1 | 42 |
Settings
This type has no settings of its own, it supports the settings of every .
Storage
| Database | Stored as | Notes |
|---|---|---|
| Neo4j | native INTEGER (64 bit) | (default) |
| MongoDB | int or long | with "storage": "document" or the placement scalar moved to MongoDB |
| Elasticsearch | long | search copy, see below |
The search is written unless the property or the type sets "search": false. Where a property is stored is explained in .
Indices
exact, see . Nested properties can be indexed as well, see nested .
Limits
Whole numbers from -9223372036854775808 to 9223372036854775807 (64 bit). JSON numbers with a fraction, e.g. 1.5, are rejected, 1.0 is accepted as 1.
Example
Schema:
{ "type": "integer", "index": "exact"}Input and output:
{ "data": { "value": 42 }}