# Is there any length limitation of the key in term aggregation ? I mean results display

**URL:** https://discuss.elastic.co/t/is-there-any-length-limitation-of-the-key-in-term-aggregation-i-mean-results-display/58024
**Category:** Elasticsearch
**Created:** [August 15, 2016, 11:55am UTC](https://discuss.elastic.co/t/is-there-any-length-limitation-of-the-key-in-term-aggregation-i-mean-results-display/58024 "2016-08-15T11:55:05Z")
**Posts on this page:** 2
**Page:** 2

<div class="post-metadata">

### Author: ![pill663](https://avatars.discourse-cdn.com/v4/letter/p/ecd19e/32.png) [@pill663](https://discuss.elastic.co/u/pill663)
#### Post date: [August 18, 2016, 6:09am UTC](https://discuss.elastic.co/t/is-there-any-length-limitation-of-the-key-in-term-aggregation-i-mean-results-display/58024/21 "2016-08-18T06:09:26Z")

</div>

Thank you very much.  
I've found a way to solve it in logstash.  
The elasticsearch-template.json in logstash is to describe the default template of mappings.  
It's in the path:  
${logstash\_home}/vendor/bundle/jruby/1.9/gems/logstash-output-elasticsearch-2.5.1-java/lib/logstash/outputs/elasticsearch/elasticsearch-template.json

So I change the ignore\_above attribute, then the long string in new index will be indexable.  
Also , I need to add 'template\_overwrite =\> true' to logstash.conf to make it into effect.  
output {  
elasticsearch {  
hosts =\> ["[https://esurl:443](https://esurl:443)"]  
ssl =\> true  
flush\_size =\> 250000  
template\_overwrite =\> true  
}  
}

---

<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: [July 5, 2017, 10:27pm UTC](https://discuss.elastic.co/t/is-there-any-length-limitation-of-the-key-in-term-aggregation-i-mean-results-display/58024/22 "2017-07-05T22:27:05Z")

</div>



[Previous page](https://discuss.elastic.co/t/is-there-any-length-limitation-of-the-key-in-term-aggregation-i-mean-results-display/58024.md?page=1)
