# Use of text fields in Visualizations

**URL:** <https://discuss.elastic.co/t/use-of-text-fields-in-visualizations/218042>\
**Category:** Kibana\
**Created:** [February 5, 2020, 6:26pm UTC](https://discuss.elastic.co/t/use-of-text-fields-in-visualizations/218042 "2020-02-05T18:26:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Denilson\_Rodrigues](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/denilson_rodrigues/32/62145_2.png) [@Denilson\_Rodrigues](https://discuss.elastic.co/u/Denilson_Rodrigues)\
**Post date:** [February 5, 2020, 6:26pm UTC](https://discuss.elastic.co/t/use-of-text-fields-in-visualizations/218042/1 "2020-02-05T18:26:10Z")

</div>

According to this [thread](https://discuss.elastic.co/t/how-to-make-a-field-aggregatable-in-kibana/90470/7), and this [docs](https://www.elastic.co/guide/en/elasticsearch/reference/current/text.html#text) , it's not possible to use text fields in visualize, because is not a agreggable field.

En my environment a have a visuzation that is using a text field, and i can clone that to work in othres. But i can't add this field in another visualizations:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/a/5/a5c948e4ce2bfd2ee0fe8a199c684712b4bec138.png)

Can someone help me to understand this?

It's a good idea to enable fielddata on this field, since it is a field containing lots of common keyords ?

Thanks in advance

---

<div class="post-metadata">

**Author:** ![thomasneirynck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thomasneirynck/32/23313_2.png) [@thomasneirynck](https://discuss.elastic.co/u/thomasneirynck)\
**Post date:** [February 5, 2020, 6:52pm UTC](https://discuss.elastic.co/t/use-of-text-fields-in-visualizations/218042/2 "2020-02-05T18:52:22Z")

</div>

hi @Denilson_Rodrigues,

the answer is a little more nuanced. Elasticsearch cannot _aggregate_ on text-fields.

So for example, in Visualize, you wouldn't be able to do a terms-aggregation on a text-field. You would for example do that to create a pie-chart or group results row-by-row on that field in a DataTable.

Since so many visualizations rely on aggregations to get the data, I guess that's where that "not possible to use text-fields for visualizations" comes from.

For top-hits, the field is used for ordering, not aggregating, so it's a little bit of an exception to the "not possible to use text-fields" guideline.

---

<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:** [March 4, 2020, 6:52pm UTC](https://discuss.elastic.co/t/use-of-text-fields-in-visualizations/218042/3 "2020-03-04T18:52:24Z")

</div>

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