# Solving too\_many\_nested\_clauses with maxClauseCount set to 1024

**URL:** <https://discuss.elastic.co/t/solving-too-many-nested-clauses-with-maxclausecount-set-to-1024/353218>\
**Category:** Elasticsearch\
**Created:** [February 14, 2024, 4:12am UTC](https://discuss.elastic.co/t/solving-too-many-nested-clauses-with-maxclausecount-set-to-1024/353218 "2024-02-14T04:12:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sreekanth\_makam](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sreekanth_makam/32/120241_2.png) [@sreekanth\_makam](https://discuss.elastic.co/u/sreekanth_makam)\
**Post date:** [February 14, 2024, 4:12am UTC](https://discuss.elastic.co/t/solving-too-many-nested-clauses-with-maxclausecount-set-to-1024/353218/1 "2024-02-14T04:12:18Z")

</div>

Hi Team,  
We are hitting below error and we understand that we are hitting this limit somewhere in our query.  
`"too_many_nested_clauses: Query contains too many nested clauses; maxClauseCount is set to 1024"`  
**Question** : How do I know what is the count that I am hitting in my query? So that it helps me set up the indices.query.bool.max\_clause\_count accordingly.

---

<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 13, 2024, 4:12am UTC](https://discuss.elastic.co/t/solving-too-many-nested-clauses-with-maxclausecount-set-to-1024/353218/2 "2024-03-13T04:12:59Z")

</div>

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