Skip to main content

Number

number holds any number, whole numbers and numbers with a fraction.

ValueExample
any JSON number21.5

Settings

This type has no settings of its own, it supports the settings of every property.

Storage

DatabaseStored asNotes
Neo4jnative FLOAT (64 bit)(default)
MongoDBdoublewith "storage": "document" or the placement role scalar moved to MongoDB
Elasticsearchdoublesearch copy, see below

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

Indices

exact, see indices. Nested properties can be indexed as well, see nested properties.

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
}
}