# Kibana painless scripted fields on text fields (not keyword)

**URL:** <https://discuss.elastic.co/t/kibana-painless-scripted-fields-on-text-fields-not-keyword/117265>\
**Category:** Kibana\
**Created:** [January 26, 2018, 8:39pm UTC](https://discuss.elastic.co/t/kibana-painless-scripted-fields-on-text-fields-not-keyword/117265 "2018-01-26T20:39:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![freemti](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/freemti/32/7288_2.png) [@freemti](https://discuss.elastic.co/u/freemti)\
**Post date:** [January 26, 2018, 8:39pm UTC](https://discuss.elastic.co/t/kibana-painless-scripted-fields-on-text-fields-not-keyword/117265/1 "2018-01-26T20:39:29Z")

</div>

am I right in thinking we cannot do scripted fields using plain text type fields as part of the string manipulations? I have had no success in trying to use a type: text field as part of any painless script.

---

<div class="post-metadata">

**Author:** ![LeeDr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leedr/32/9289_2.png) [@LeeDr](https://discuss.elastic.co/u/LeeDr)\
**Post date:** [January 26, 2018, 9:33pm UTC](https://discuss.elastic.co/t/kibana-painless-scripted-fields-on-text-fields-not-keyword/117265/2 "2018-01-26T21:33:22Z")

</div>

Yes, I think the requirement for the field is that it has to be searchable and aggregatable to use it in a scripted field.

---

<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:** [February 23, 2018, 9:33pm UTC](https://discuss.elastic.co/t/kibana-painless-scripted-fields-on-text-fields-not-keyword/117265/3 "2018-02-23T21:33:59Z")

</div>

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