Fixing ElasticSearch 'Unknown key for a VALUE_NUMBER in [offset].'
The error message
Unknown key for a VALUE_NUMBER in [offset].
in ElasticSearch tells you that in the query JSON you have specified an offset
(numeric value) but ElasticSearch doesn’t know what to do with offset
.
This is easy to fix: In order to specify an offset to start from, use from
instead of offset
.
Incorrect:
{
"size": 250,
"offset": 1000
}
Correct:
{
"size": 250,
"from": 1000
}