# Theoretical limit on number of boolean queries

**URL:** <https://discuss.elastic.co/t/theoretical-limit-on-number-of-boolean-queries/267487>\
**Category:** Elasticsearch\
**Created:** [March 17, 2021, 11:24am UTC](https://discuss.elastic.co/t/theoretical-limit-on-number-of-boolean-queries/267487 "2021-03-17T11:24:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sarthi2395](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sarthi2395/32/85676_2.png) [@sarthi2395](https://discuss.elastic.co/u/sarthi2395)\
**Post date:** [March 17, 2021, 11:24am UTC](https://discuss.elastic.co/t/theoretical-limit-on-number-of-boolean-queries/267487/1 "2021-03-17T11:24:15Z")

</div>

Is there a upper limit on how many boolean 'should' queries that I can run on an single API call?

Say I have my query as

```auto
{
	"query": {
		"bool": {
			"should": [{
					"prefix": {
						"key1": <Path 1>
					}
				},
				{
					"prefix": {
						"key2": <Path 2>
					}
				},
                                {
					"prefix": {
						"keyn": <Path n>
					}
				}
			]
		}
	}
}

```

Is there a cap on `n`?

---

<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:** [April 14, 2021, 11:24am UTC](https://discuss.elastic.co/t/theoretical-limit-on-number-of-boolean-queries/267487/2 "2021-04-14T11:24:22Z")

</div>

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