# Max query length allowed in elasticsearch

**URL:** https://discuss.elastic.co/t/max-query-length-allowed-in-elasticsearch/8128
**Category:** Elasticsearch
**Created:** [June 16, 2012, 8:37am UTC](https://discuss.elastic.co/t/max-query-length-allowed-in-elasticsearch/8128 "2012-06-16T08:37:53Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![narinder\_izap](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/narinder_izap/32/803_2.png) [@narinder\_izap](https://discuss.elastic.co/u/narinder_izap)
#### Post date: [June 16, 2012, 8:37am UTC](https://discuss.elastic.co/t/max-query-length-allowed-in-elasticsearch/8128/1 "2012-06-16T08:37:53Z")

</div>

Hi there,  
I need to send a large bunch of ids in terms query, and i tried  
with approx 2000 guids, but I found that the data is not being posted to  
elasticseach. Json array was empty. Is there any limit to max count of  
values in terms query??and is there any config setting that can increase  
the max query length for terms query.

I just tried to find out on web if its the json\_encode function that does  
not support such a large array size to encode, but its not the case, so  
second thing that came to my mind is if elasticsearch terms query supports  
this or not??

Any help or guidance will be highly appreciated.

Narinder Kaur

---

<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 6, 2017, 3:23am UTC](https://discuss.elastic.co/t/max-query-length-allowed-in-elasticsearch/8128/2 "2017-07-06T03:23:46Z")

</div>


