# Bool should query with result limit for each condition

**URL:** https://discuss.elastic.co/t/bool-should-query-with-result-limit-for-each-condition/132933
**Category:** Elasticsearch
**Created:** [May 23, 2018, 7:01am UTC](https://discuss.elastic.co/t/bool-should-query-with-result-limit-for-each-condition/132933 "2018-05-23T07:01:06Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![tushar\_chevulkar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tushar_chevulkar/32/46270_2.png) [@tushar\_chevulkar](https://discuss.elastic.co/u/tushar_chevulkar)
#### Post date: [May 23, 2018, 7:01am UTC](https://discuss.elastic.co/t/bool-should-query-with-result-limit-for-each-condition/132933/1 "2018-05-23T07:01:06Z")

</div>

Hello,  
Is there a way i can give limit to each should condition ?  
for e.g. in the below query i need only 10 results for each source.

```
  {
				  "query": {
					"bool": {
						
					  "should": [
						{
						  "match_phrase": {
			"link": "https://www.b.in/"
						    }
						    ""
						},{
						  "match_phrase": {
							"link": "https://www.a.in"
						  }
						}
					  ]
					}
				  },"sort": [
						{
						  "pub_date": {
							"order": "desc"
						  }
						}
					  ]
				}
```

---

<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: [June 20, 2018, 7:05am UTC](https://discuss.elastic.co/t/bool-should-query-with-result-limit-for-each-condition/132933/2 "2018-06-20T07:05:31Z")

</div>

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