Number
number holds any number, whole numbers and numbers with a fraction.
| Value | Example |
|---|---|
| any JSON number | 21.5 |
Settings
This type has no settings of its own, it supports the settings of every .
Storage
| Database | Stored as | Notes |
|---|---|---|
| Neo4j | native FLOAT (64 bit) | (default) |
| MongoDB | double | with "storage": "document" or the placement scalar moved to MongoDB |
| Elasticsearch | double | 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
Numbers are stored as 64 bit floating point numbers (IEEE 754), very large whole numbers lose precision. Use integer for counters and ids.
Example
Schema:
{ "type": "number", "index": "exact"}Input and output:
{ "data": { "value": 21.5 }}