# Is there a way for ES to config maximum size for a single term?

**URL:** https://discuss.elastic.co/t/is-there-a-way-for-es-to-config-maximum-size-for-a-single-term/58419
**Category:** Elasticsearch
**Created:** [August 19, 2016, 2:04am UTC](https://discuss.elastic.co/t/is-there-a-way-for-es-to-config-maximum-size-for-a-single-term/58419 "2016-08-19T02:04:44Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![makeyang](https://avatars.discourse-cdn.com/v4/letter/m/f05b48/32.png) [@makeyang](https://discuss.elastic.co/u/makeyang)
#### Post date: [August 19, 2016, 2:04am UTC](https://discuss.elastic.co/t/is-there-a-way-for-es-to-config-maximum-size-for-a-single-term/58419/1 "2016-08-19T02:04:44Z")

</div>

default max length is 32766.  
I'd like to make it small.

---

<div class="post-metadata">

### Author: ![rmuir](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rmuir/32/44949_2.png) [@rmuir](https://discuss.elastic.co/u/rmuir)
#### Post date: [August 19, 2016, 2:25am UTC](https://discuss.elastic.co/t/is-there-a-way-for-es-to-config-maximum-size-for-a-single-term/58419/2 "2016-08-19T02:25:05Z")

</div>

Yes, you can do this with the analysis chain: depending if you want to drop the too-big tokens ([https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-length-tokenfilter.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-length-tokenfilter.html)) or truncate them to a smaller size ([https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-truncate-tokenfilter.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-truncate-tokenfilter.html))

---

<div class="post-metadata">

### Author: ![makeyang](https://avatars.discourse-cdn.com/v4/letter/m/f05b48/32.png) [@makeyang](https://discuss.elastic.co/u/makeyang)
#### Post date: [August 19, 2016, 3:38am UTC](https://discuss.elastic.co/t/is-there-a-way-for-es-to-config-maximum-size-for-a-single-term/58419/3 "2016-08-19T03:38:59Z")

</div>

> [@rmuir](#):
>
> [Truncate token filter | Elasticsearch Guide [8.11] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-truncate-tokenfilter.html)

got it. thanks very much

---

<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:26pm UTC](https://discuss.elastic.co/t/is-there-a-way-for-es-to-config-maximum-size-for-a-single-term/58419/4 "2017-07-05T22:26:49Z")

</div>


