# Simple query giving error: Query contains too many nested clauses

**URL:** <https://discuss.elastic.co/t/simple-query-giving-error-query-contains-too-many-nested-clauses/310779>\
**Category:** Kibana\
**Created:** [July 27, 2022, 5:31pm UTC](https://discuss.elastic.co/t/simple-query-giving-error-query-contains-too-many-nested-clauses/310779 "2022-07-27T17:31:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gabrsar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gabrsar/32/107206_2.png) [@gabrsar](https://discuss.elastic.co/u/gabrsar)\
**Post date:** [July 27, 2022, 5:31pm UTC](https://discuss.elastic.co/t/simple-query-giving-error-query-contains-too-many-nested-clauses/310779/1 "2022-07-27T17:31:23Z")

</div>

Hi! A few weeks ago I started noticing that any query I made with more than one word give me the error "Query contains too many nested clauses; maxClauseCount is set to 1024".

I'm doing something wrong?

Example of queries that give this error:

```auto
two words
"two" AND "words"
two and words

```

but this works:  
`req.url:* and _index: staging*`

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/a/c/ac7bd77b4df32f66e506f9dc6dad1fa81980ad4a.png)

I'm using ELK Cloud. Thank you.

---

<div class="post-metadata">

**Author:** ![Marius\_Dragomir](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marius_dragomir/32/42087_2.png) [@Marius\_Dragomir](https://discuss.elastic.co/u/Marius_Dragomir)\
**Post date:** [August 12, 2022, 10:24pm UTC](https://discuss.elastic.co/t/simple-query-giving-error-query-contains-too-many-nested-clauses/310779/2 "2022-08-12T22:24:31Z")

</div>

Hello,  
That shouldn't really happen with just 2 or 3 terms in the serach. Can you look in the browser console and check the request that is made when this error occurs or post it here?

---

<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 9, 2022, 10:24pm UTC](https://discuss.elastic.co/t/simple-query-giving-error-query-contains-too-many-nested-clauses/310779/3 "2022-09-09T22:24:38Z")

</div>

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