# Field loss occurs when making a runtime field

**URL:** <https://discuss.elastic.co/t/field-loss-occurs-when-making-a-runtime-field/338658>\
**Category:** Elasticsearch\
**Tags:** runtime-fields\
**Created:** [July 18, 2023, 10:57am UTC](https://discuss.elastic.co/t/field-loss-occurs-when-making-a-runtime-field/338658 "2023-07-18T10:57:30Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![e997cd7e8d9915436150](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/e997cd7e8d9915436150/32/40255_2.png) [@e997cd7e8d9915436150](https://discuss.elastic.co/u/e997cd7e8d9915436150)\
**Post date:** [July 18, 2023, 10:57am UTC](https://discuss.elastic.co/t/field-loss-occurs-when-making-a-runtime-field/338658/1 "2023-07-18T10:57:30Z")

</div>

![1](https://us1.discourse-cdn.com/elastic/original/3X/f/6/f6fb4bb23fc67ec43ae31b4f7bb9baa24b97c0a4.png)

IF agent(original) field exists, the copy field must also exist. However it often happens that there is an agent field but no copy field. Has anyone experienced the same problem?

 ![2](https://us1.discourse-cdn.com/elastic/original/3X/6/7/6705e4977abc18a7696f9c0adf18859ec5609ce2.png)

---

<div class="post-metadata">

**Author:** ![stu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stu/32/75063_2.png) [@stu](https://discuss.elastic.co/u/stu)\
**Post date:** [July 19, 2023, 4:27pm UTC](https://discuss.elastic.co/t/field-loss-occurs-when-making-a-runtime-field/338658/2 "2023-07-19T16:27:30Z")

</div>

Sometimes a keyword field is dropped because of the [ignore\_above](https://www.elastic.co/guide/en/elasticsearch/reference/current/ignore-above.html) parameter. I notice in the screen shot contains `agent` and not `agent.keyword`.

If the `agent` is longer than `ignore_above`, then `agent.keyword` will be empty and `doc['agent.keyword'].size()` will be zero, so no value will be emitted.

I recommend checking `agent.keyword` and `ignore_above`.

---

<div class="post-metadata">

**Author:** ![e997cd7e8d9915436150](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/e997cd7e8d9915436150/32/40255_2.png) [@e997cd7e8d9915436150](https://discuss.elastic.co/u/e997cd7e8d9915436150)\
**Post date:** [July 20, 2023, 10:58am UTC](https://discuss.elastic.co/t/field-loss-occurs-when-making-a-runtime-field/338658/3 "2023-07-20T10:58:30Z")

</div>

Wow thank you very much. After setting the ignore\_above value of the agent.keyword field to 2560, the loss of value disappeared. Have a good day.🙂

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [August 17, 2023, 10:59am UTC](https://discuss.elastic.co/t/field-loss-occurs-when-making-a-runtime-field/338658/4 "2023-08-17T10:59:09Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
