WARNING: Version 2.3 of Elasticsearch has passed its EOL date.
This documentation is no longer being maintained and may be removed. If you are running this version, we strongly advise you to upgrade. For the latest information, see the current release documentation.
precision_step
editprecision_step
editMost numeric datatypes index extra terms representing numeric
ranges for each number to make range
queries
faster. For instance, this range
query:
"range": { "number": { "gte": 0 "lte": 321 } }
might be executed internally as a terms
query that
looks something like this:
"terms": { "number": [ "0-255", "256-319" "320", "321" ] }
These extra terms greatly reduce the number of terms that have to be examined, at the cost of increased disk space.
The default value for precision_step
depends on the type
of the numeric field:
|
|
|
|
|
|
|
|
The value of the precision_step
setting indicates the number of bits that
should be compressed into an extra term. A long
value consists of 64 bits,
so a precision_step
of 16 results in the following terms:
Bits 0-15 |
|
Bits 0-31 |
|
Bits 0-47 |
|
Bits 0-63 |
|