# Length of string

**URL:** <https://discuss.elastic.co/t/length-of-string/202078>\
**Category:** Elasticsearch\
**Created:** [October 3, 2019, 1:22am UTC](https://discuss.elastic.co/t/length-of-string/202078 "2019-10-03T01:22:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![hunter32](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hunter32/32/138468_2.png) [@hunter32](https://discuss.elastic.co/u/hunter32)\
**Post date:** [October 3, 2019, 1:22am UTC](https://discuss.elastic.co/t/length-of-string/202078/1 "2019-10-03T01:22:12Z")

</div>

Converting Visualizations from our old Splunk system to Elastic. What we are looking at doing is taking the string length of a field.keyword and then visualization the length to the count. So far I have not found a way in the query to extract the length. I have created a scripted field that gives that creates a field and sets the string length. Run into two problems with that. I was told this is the wrong way to do this, and more important when I try to graph the length values even though they show up in discover nonthing will show up when trying to visualize it.

---

<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:** [October 31, 2019, 1:22am UTC](https://discuss.elastic.co/t/length-of-string/202078/2 "2019-10-31T01:22:14Z")

</div>

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