Open salvatore-campagna opened 1 year ago
Pinging @elastic/es-analytics-geo (Team:Analytics)
Here the idea is to update documentation explaining the issue, that we do not support rollup on _size
field, adding some YAML test documenting the behaviour and explaining how to workaround it using runtime fields.
Pinging @elastic/es-storage-engine (Team:StorageEngine)
Elasticsearch Version
8.8.0
Installed Plugins
No response
Java Version
bundled
OS Version
All
Problem Description
Aggregation on size field done by a Rollup job fails with the following error:
Indexing fails because, after a bucket is aggregated the Rollup job tried to write a field whose name is
_size
and whose value is the aggregation over time (sum) of all the documents_size
values for a specific time bucket. This is not possible, unfortunately, because_size
is a special meta field used to indicate the size of the_source
fo a document. It comes from theMapperSize
plugin.A workaround exists which takes advantage of runtime fields. We can read the
_size
field using a runtime field script and later on aggregate on the runtime field writing a field whose name is not_size
, but some other name we are allowed to use.Example
Steps to Reproduce
Step 1
Step 2
Logs (if relevant)