# How to find the length of a field

**URL:** <https://discuss.elastic.co/t/how-to-find-the-length-of-a-field/151377>\
**Category:** Kibana\
**Created:** [October 8, 2018, 2:38am UTC](https://discuss.elastic.co/t/how-to-find-the-length-of-a-field/151377 "2018-10-08T02:38:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Harvinder\_Singh](https://avatars.discourse-cdn.com/v4/letter/h/5e9695/32.png) [@Harvinder\_Singh](https://discuss.elastic.co/u/Harvinder_Singh)\
**Post date:** [October 8, 2018, 2:38am UTC](https://discuss.elastic.co/t/how-to-find-the-length-of-a-field/151377/1 "2018-10-08T02:38:02Z")

</div>

I have an index with a field DataAscii of type string. I would like to plot the length of this field in timeline. One option is to use scripted field. I have tried with following, but it does seems to be working

doc['DataAscii'].value.length()

In fact, a very simple expression like doc['DataAscii'].value is giving me the error

Courier fetch: 5 out of 10 shards failed

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [October 8, 2018, 3:50am UTC](https://discuss.elastic.co/t/how-to-find-the-length-of-a-field/151377/2 "2018-10-08T03:50:20Z")

</div>

> [@Harvinder\_Singh](#):
>
> In fact, a very simple expression like doc['DataAscii'].value is giving me the error
> 
> Courier fetch: 5 out of 10 shards failed

Check your Elasticsearch logs to see what is causing this.

---

<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 5, 2018, 3:50am UTC](https://discuss.elastic.co/t/how-to-find-the-length-of-a-field/151377/3 "2018-11-05T03:50:30Z")

</div>

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