# Making string field aggregatable in kibana

**URL:** <https://discuss.elastic.co/t/making-string-field-aggregatable-in-kibana/98373>\
**Category:** Elasticsearch\
**Created:** [August 25, 2017, 1:37pm UTC](https://discuss.elastic.co/t/making-string-field-aggregatable-in-kibana/98373 "2017-08-25T13:37:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Singa\_Forever](https://avatars.discourse-cdn.com/v4/letter/s/898d66/32.png) [@Singa\_Forever](https://discuss.elastic.co/u/Singa_Forever)\
**Post date:** [August 25, 2017, 1:37pm UTC](https://discuss.elastic.co/t/making-string-field-aggregatable-in-kibana/98373/1 "2017-08-25T13:37:33Z")

</div>

Hello,

This is my first time using elk 5.5 for gathering tweets from twitter, everything is ok and works fine.  
In order to handle my application, I need to make the filed text (tweets ) as an aggregatable field, i tried to add raw field to text but nothing happened.

> "properties": {  
> "text": {  
> "type" : "keyword","index": "not\_analyzed",  
> "fields" : {  
> "raw" : {"type": "text", "index" : "not\_analyzed"}  
> }  
> },

This is the json template that I'm using

> Blockquote  
> {  
> "template": "twitter",  
> "order": 1,  
> "settings": {  
> "number\_of\_shards": 3  
> },  
> "mappings": {  
> "tweet": {  
> "\_all": {  
> "enabled": true  
> },  
> "dynamic\_templates" : [ {  
> "message\_field" : {  
> "match" : "message",  
> "match\_mapping\_type" : "text",  
> "mapping" : {  
> "type" : "text", "index" : "not\_analyzed",  
> "fields" : {  
> "raw" : {"type": "text", "index" : "not\_analyzed"}  
> }  
> }  
> }  
> }, {  
> "text\_fields" : {  
> "match" : "\*",  
> "match\_mapping\_type" : "text",  
> "mapping" : {  
> "type" : "text", "index" : "not\_analyzed", "omit\_norms" : true,  
> "fields" : {  
> "raw" : {"type": "text", "index" : "not\_analyzed", "ignore\_above" : 256}  
> }  
> }  
> }  
> } ],  
> "properties": {  
> "text": {  
> "type" : "keyword","index": "not\_analyzed",  
> "fields" : {  
> "raw" : {"type": "text", "index" : "not\_analyzed"}  
> }  
> },  
> "created\_at": {  
> "index": "not\_analyzed",  
> "type": "date",  
> "format": "EEE MMM dd HH:mm:ss Z yyyy",  
> "locale": "US"  
> },  
> "user": {  
> "properties": {  
> "created\_at": {  
> "index": "not\_analyzed",  
> "type": "date",  
> "format": "EEE MMM dd HH:mm:ss Z yyyy",  
> "locale": "US"  
> },  
> "screen\_name": {  
> "index": "not\_analyzed",  
> "type": "text"  
> },  
> "type": {  
> "type": "text"  
> }  
> }  
> },  
> "coordinates": {  
> "properties": {  
> "coordinates": {  
> "type": "geo\_point"  
> },  
> "type": {  
> "type": "text"  
> }  
> }  
> }  
> }  
> }  
> }  
> }

waiting for your help,  
Thank you

---

<div class="post-metadata">

**Author:** ![ppisljar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ppisljar/32/11588_2.png) [@ppisljar](https://discuss.elastic.co/u/ppisljar)\
**Post date:** [August 25, 2017, 2:11pm UTC](https://discuss.elastic.co/t/making-string-field-aggregatable-in-kibana/98373/2 "2017-08-25T14:11:00Z")

</div>

i moved this to elasticsearch forum as i think thats better place for this question

---

<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:** [September 22, 2017, 2:11pm UTC](https://discuss.elastic.co/t/making-string-field-aggregatable-in-kibana/98373/3 "2017-09-22T14:11:04Z")

</div>

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