# Runtime Mapping agg query error

**URL:** <https://discuss.elastic.co/t/runtime-mapping-agg-query-error/364883>\
**Category:** Elasticsearch\
**Tags:** painless, runtime-fields\
**Created:** [August 14, 2024, 6:32am UTC](https://discuss.elastic.co/t/runtime-mapping-agg-query-error/364883 "2024-08-14T06:32:58Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Musab\_Dogan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/musab_dogan/32/70691_2.png) [@Musab\_Dogan](https://discuss.elastic.co/u/Musab_Dogan)\
**Post date:** [August 14, 2024, 2:41pm UTC](https://discuss.elastic.co/t/runtime-mapping-agg-query-error/364883/2 "2024-08-14T14:41:27Z")

</div>

The error looks related to `nested` field type. There are a couple of workarounds for that. Sharing a similar discussions below.

1. [How to access objects fields nested value in runtime field painless (or expression) scripts?](https://discuss.elastic.co/t/how-to-access-objects-fields-nested-value-in-runtime-field-painless-or-expression-scripts/302699)
2. [How to create an array runtime field - #10 by cr\_168328](https://discuss.elastic.co/t/how-to-create-an-array-runtime-field/322791/10)
3. [kibana - How to create an array type runtime field based on a nested field in elasticsearch? - Stack Overflow](https://stackoverflow.com/questions/75066316/how-to-create-an-array-type-runtime-field-based-on-a-nested-field-in-elasticsear)

---

_[View the full topic](https://discuss.elastic.co/t/runtime-mapping-agg-query-error/364883)._
