# How to implement max\_analyzed\_offset limit in Kibana \> Discovery for extra long fields

**URL:** <https://discuss.elastic.co/t/how-to-implement-max-analyzed-offset-limit-in-kibana-discovery-for-extra-long-fields/344892>\
**Category:** Kibana\
**Created:** [October 12, 2023, 9:53am UTC](https://discuss.elastic.co/t/how-to-implement-max-analyzed-offset-limit-in-kibana-discovery-for-extra-long-fields/344892 "2023-10-12T09:53:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![elk1985](https://avatars.discourse-cdn.com/v4/letter/e/58956e/32.png) [@elk1985](https://discuss.elastic.co/u/elk1985)\
**Post date:** [October 12, 2023, 9:53am UTC](https://discuss.elastic.co/t/how-to-implement-max-analyzed-offset-limit-in-kibana-discovery-for-extra-long-fields/344892/1 "2023-10-12T09:53:03Z")

</div>

Hello.  
I have problems with logs that having field message even 10 millions characters long. I will be removed from logs in future. But for now I'm getting shard fail error. The solution is setting max\_analyzed\_offset limit - but documentation refers to using that in Dev Tools. Where I can put max\_analyzed\_offset limit as an option so it will be limiting fields to lets say 1 000 000 characters and not showing the rest. I need it in Kibana \> Discovery. Any ideas ?

---

<div class="post-metadata">

**Author:** ![jughosta](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jughosta/32/107160_2.png) [@jughosta](https://discuss.elastic.co/u/jughosta)\
**Post date:** [October 18, 2023, 1:55pm UTC](https://discuss.elastic.co/t/how-to-implement-max-analyzed-offset-limit-in-kibana-discovery-for-extra-long-fields/344892/2 "2023-10-18T13:55:02Z")

</div>

Hi @elk1985,

In Kibana UI there is an option to define data view field filters to exclude unwanted fields (via Data View Management page). And you can define a runtime field with a custom logic for truncation. Then you would be able to preview this runtime field in Discover.

---

<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:** [November 15, 2023, 1:55pm UTC](https://discuss.elastic.co/t/how-to-implement-max-analyzed-offset-limit-in-kibana-discovery-for-extra-long-fields/344892/3 "2023-11-15T13:55:41Z")

</div>

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